{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 本代码有如下练习：\n",
    "1/2. [（逆）地理编码](https://lbs.amap.com/api/webservice/guide/api/georegeo)\n",
    "3. [路径规划](https://lbs.amap.com/api/webservice/guide/api/direction)\n",
    "4. [行政区域](https://lbs.amap.com/api/webservice/guide/api/direction)\n",
    "5. [搜索POI](https://lbs.amap.com/api/webservice/guide/api/search)\n",
    "6. [IP定位](https://lbs.amap.com/api/webservice/guide/api/ipconfig)\n",
    "7. [静态地图](https://lbs.amap.com/api/webservice/guide/api/staticmaps)\n",
    "8. [坐标转换](https://lbs.amap.com/api/webservice/guide/api/convert)\n",
    "9. [天气查询](https://lbs.amap.com/api/webservice/guide/api/weatherinfo)\n",
    "10. [输入提示](https://lbs.amap.com/api/webservice/guide/api/inputtips)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 准备工作"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 238,
   "metadata": {},
   "outputs": [],
   "source": [
    "import requests,json\n",
    "import pandas as pd\n",
    "xiaoliu_map = \"d8383619b68b944efbd5dfdab977b2ae\""
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## [地理编码](https://lbs.amap.com/api/webservice/guide/api/georegeo)\n",
    "- 1.1 地理编码/逆地理编码 API 是通过 HTTP/HTTPS 协议访问远程服务的接口，提供结构化地址与经纬度之间的相互转化的能力。\n",
    "- 1.2 URL: https://restapi.amap.com/v3/geocode/geo?parameters  \n",
    "- 1.3 请求参数：key值、address"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 239,
   "metadata": {},
   "outputs": [],
   "source": [
    "# A-1\n",
    "# 准备工作中没写的写在这里\n",
    "address = \"广东省中山大学南方学院\"\n",
    "url_geocode = \"https://restapi.amap.com/v3/geocode/geo?parameters\"\n",
    "params_geocode = {\n",
    "    \"key\": xiaoliu_map,\n",
    "    \"address\": address\n",
    "    \n",
    "}\n",
    "response = requests.get(url=url_geocode,params=params_geocode)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 240,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.392782,22.517645'"
      ]
     },
     "execution_count": 240,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "中大南方_location = response.json()['geocodes'][0]['location']\n",
    "中大南方_location"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 逆地理编码\n",
    "url:https://restapi.amap.com/v3/geocode/regeo?parameters"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 241,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 逆地理编码函数\n",
    "def regeo(key,location,extensions=\"base\",radius=None,poitype=None):\n",
    "    \"\"\"\"\"\"\n",
    "    url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "    params = {\n",
    "        \"key\":key,\n",
    "        \"location\":location,\n",
    "        \"extensions\":extensions,\n",
    "        \"radius\":radius,\n",
    "        \"poitype\":poitype\n",
    "    }\n",
    "    r = requests.get(url,params)\n",
    "    results = r.json()\n",
    "    return results\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 242,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 242,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "url = \"https://restapi.amap.com/v3/geocode/regeo?parameters\"\n",
    "params = {\n",
    "    \"key\":xiaoliu_map,\n",
    "    \"location\":中大南方_location,\n",
    "    \"extensions\":\"all\"\n",
    "}\n",
    "r = requests.get(url,params)\n",
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 243,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['兴龙街', '细柏山下街', '细柏山龙井街一横巷']"
      ]
     },
     "execution_count": 243,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "_roads_ = []\n",
    "for item in r.json()['regeocode']['roads']:\n",
    "#     print(item['name'])\n",
    "    _roads_.append(item['name'])\n",
    "_roads_"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 244,
   "metadata": {
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'regeocode': {'roads': [{'id': '0760F49F0180441541',\n",
       "    'location': '113.393,22.5182',\n",
       "    'direction': '南',\n",
       "    'name': '兴龙街',\n",
       "    'distance': '59.315'},\n",
       "   {'id': '0760F49F01804413696',\n",
       "    'location': '113.393,22.5181',\n",
       "    'direction': '西南',\n",
       "    'name': '细柏山下街',\n",
       "    'distance': '69.1886'},\n",
       "   {'id': '0760F49F018044629881',\n",
       "    'location': '113.394,22.5185',\n",
       "    'direction': '西南',\n",
       "    'name': '细柏山龙井街一横巷',\n",
       "    'distance': '138.822'}],\n",
       "  'roadinters': [{'second_name': '细柏山龙井街一横巷',\n",
       "    'first_id': '0760F49F018044321',\n",
       "    'second_id': '0760F49F018044629881',\n",
       "    'location': '113.394234,22.518287',\n",
       "    'distance': '165.376',\n",
       "    'first_name': '龙井街',\n",
       "    'direction': '西南'}],\n",
       "  'formatted_address': '广东省中山市东区街道松苑路1号中山市人民政府',\n",
       "  'addressComponent': {'city': '中山市',\n",
       "   'province': '广东省',\n",
       "   'adcode': '442000',\n",
       "   'district': [],\n",
       "   'towncode': '442000002000',\n",
       "   'streetNumber': {'number': '1号',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'direction': '南',\n",
       "    'distance': '6.78388',\n",
       "    'street': '松苑路'},\n",
       "   'country': '中国',\n",
       "   'township': '东区街道',\n",
       "   'businessAreas': [{'location': '113.399707,22.517534',\n",
       "     'name': '竹苑',\n",
       "     'id': '442000'},\n",
       "    {'location': '113.394174,22.507789', 'name': '库充村', 'id': '442000'}],\n",
       "   'building': {'name': [], 'type': []},\n",
       "   'neighborhood': {'name': [], 'type': []},\n",
       "   'citycode': '0760'},\n",
       "  'aois': [{'area': '62940.528165',\n",
       "    'type': '130103',\n",
       "    'id': 'B02F8007GK',\n",
       "    'location': '113.392517,22.517024',\n",
       "    'adcode': '442000',\n",
       "    'name': '中山市人民政府',\n",
       "    'distance': '0'}],\n",
       "  'pois': [{'id': 'B02F8007GK',\n",
       "    'direction': '西南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号',\n",
       "    'poiweight': '0.612624',\n",
       "    'name': '中山市人民政府',\n",
       "    'location': '113.392517,22.517024',\n",
       "    'distance': '74.2384',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F8025U9',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.206985',\n",
       "    'name': '中共中山市委员会',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': '0760-88322220',\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F800L06',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.319792',\n",
       "    'name': '中山市纪律检查委员会',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': '0760-88312739',\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F802UB1',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院5层',\n",
       "    'poiweight': '0.281316',\n",
       "    'name': '中山市发展和改革局',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': '0760-88328407',\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F800IL3',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.361177',\n",
       "    'name': '中山市物价局',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': '0760-88319851',\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F800FWB',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.379006',\n",
       "    'name': '中山市人事局',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F800JWZ',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.267135',\n",
       "    'name': '中山市信访局',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F8008Q3',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.384902',\n",
       "    'name': '中山市统计局',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F800EUB',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.326743',\n",
       "    'name': '中山市科技局',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': '0760-88315063',\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F800IC8',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.21115',\n",
       "    'name': '中山市外事局',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F800E72',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.41022',\n",
       "    'name': '中山市监察局',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F8037XS',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院3层',\n",
       "    'poiweight': '0.364049',\n",
       "    'name': '中山市知识产权局',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F802BBP',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.311057',\n",
       "    'name': '中山市老干部局(兴龙街)',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F800BTD',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.252587',\n",
       "    'name': '中山市发展计划局',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F800GQE',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.358402',\n",
       "    'name': '中山市审计局(兴龙街)',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F800FCO',\n",
       "    'direction': '南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号市政府大院',\n",
       "    'poiweight': '0.12303',\n",
       "    'name': '中山市民族宗教事务局(兴龙街)',\n",
       "    'location': '113.392770,22.517585',\n",
       "    'distance': '6.78388',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F801B65',\n",
       "    'direction': '西北',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '兴中道15号',\n",
       "    'poiweight': '0.48',\n",
       "    'name': '中山市城市建设档案馆(兴中道)',\n",
       "    'location': '113.391334,22.518526',\n",
       "    'distance': '178.117',\n",
       "    'tel': [],\n",
       "    'type': '科教文化服务;档案馆;档案馆'},\n",
       "   {'id': 'B02F80QPCE',\n",
       "    'direction': '东南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '三乡镇松苑路1号',\n",
       "    'poiweight': '0.043686',\n",
       "    'name': '中山市经济和信息化局',\n",
       "    'location': '113.393600,22.516977',\n",
       "    'distance': '112.161',\n",
       "    'tel': '0760-88315312',\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B0FFG9ZNYV',\n",
       "    'direction': '东南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '兴龙街与细柏山下街交叉口西南100米',\n",
       "    'poiweight': '0.241479',\n",
       "    'name': '中山市政府大楼',\n",
       "    'location': '113.393639,22.516979',\n",
       "    'distance': '115.045',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;楼宇;商务写字楼'},\n",
       "   {'id': 'B0FFHMWLPV',\n",
       "    'direction': '东北',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '兴龙街61号',\n",
       "    'poiweight': '0.171091',\n",
       "    'name': '中山市嘉艺雅学画馆',\n",
       "    'location': '113.393448,22.518154',\n",
       "    'distance': '88.7927',\n",
       "    'tel': '18218095103',\n",
       "    'type': '科教文化服务;培训机构;培训机构'},\n",
       "   {'id': 'B02F80Q2VN',\n",
       "    'direction': '东',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '龙井街',\n",
       "    'poiweight': '0.163821',\n",
       "    'name': '百家筝鸣古筝艺术中心(东区分校)',\n",
       "    'location': '113.394168,22.518076',\n",
       "    'distance': '150.238',\n",
       "    'tel': '0760-88829100;0760-88879100',\n",
       "    'type': '科教文化服务;培训机构;培训机构'},\n",
       "   {'id': 'B02F800Z51',\n",
       "    'direction': '东',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '龙井街32号3卡',\n",
       "    'poiweight': '0.167293',\n",
       "    'name': '墨仙书画创作展示馆',\n",
       "    'location': '113.394409,22.517627',\n",
       "    'distance': '167.136',\n",
       "    'tel': '0760-88316316',\n",
       "    'type': '科教文化服务;科教文化场所;科教文化场所'},\n",
       "   {'id': 'B02F80Q6JM',\n",
       "    'direction': '东南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号正西方向115米',\n",
       "    'poiweight': '0.224258',\n",
       "    'name': '中共中山市委中山市人民政府群众来访接待室',\n",
       "    'location': '113.393465,22.516141',\n",
       "    'distance': '181.356',\n",
       "    'tel': '0760-88365337',\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B0FFGBB5JO',\n",
       "    'direction': '东北',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '细柏山兴龙街51号',\n",
       "    'poiweight': '0.266288',\n",
       "    'name': '梁宅',\n",
       "    'location': '113.393350,22.518197',\n",
       "    'distance': '84.6875',\n",
       "    'tel': [],\n",
       "    'type': '商务住宅;住宅区;住宅小区'},\n",
       "   {'id': 'B02F80QN9C',\n",
       "    'direction': '西北',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '兴中道15号',\n",
       "    'poiweight': '0.249433',\n",
       "    'name': '中山市人民防空办公室',\n",
       "    'location': '113.391221,22.518560',\n",
       "    'distance': '189.892',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F802OT1',\n",
       "    'direction': '东南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号',\n",
       "    'poiweight': '0.114001',\n",
       "    'name': '中山市人民政府行政复议委员会办公室复议案件受理点',\n",
       "    'location': '113.393465,22.516141',\n",
       "    'distance': '181.356',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B0FFFP07RK',\n",
       "    'direction': '东北',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '兴龙街59号',\n",
       "    'poiweight': '0.163173',\n",
       "    'name': '中山市彩莹文化传播有限公司',\n",
       "    'location': '113.393705,22.518117',\n",
       "    'distance': '108.373',\n",
       "    'tel': '0760-88830785',\n",
       "    'type': '科教文化服务;传媒机构;传媒机构'},\n",
       "   {'id': 'B0FFKYFCMW',\n",
       "    'direction': '西南',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '松苑路1号',\n",
       "    'poiweight': '0.223911',\n",
       "    'name': '中山市档案局',\n",
       "    'location': '113.392738,22.517576',\n",
       "    'distance': '8.88863',\n",
       "    'tel': [],\n",
       "    'type': '政府机构及社会团体;政府机关;地市级政府及事业单位'},\n",
       "   {'id': 'B02F80Q6TO',\n",
       "    'direction': '西北',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '东区兴龙街11-13号',\n",
       "    'poiweight': '0.180197',\n",
       "    'name': '中山市众联信息科技有限公司',\n",
       "    'location': '113.391825,22.518349',\n",
       "    'distance': '125.656',\n",
       "    'tel': '18923310088',\n",
       "    'type': '公司企业;公司;公司'},\n",
       "   {'id': 'B0FFH0MOZI',\n",
       "    'direction': '东北',\n",
       "    'businessarea': '竹苑',\n",
       "    'address': '兴龙街55号',\n",
       "    'poiweight': '0.170713',\n",
       "    'name': '广州市市政工程监理有限公司',\n",
       "    'location': '113.393465,22.518149',\n",
       "    'distance': '89.7928',\n",
       "    'tel': [],\n",
       "    'type': '公司企业;公司;公司'}]},\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000'}"
      ]
     },
     "execution_count": 244,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 245,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>direction</th>\n",
       "      <th>businessarea</th>\n",
       "      <th>address</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>name</th>\n",
       "      <th>location</th>\n",
       "      <th>distance</th>\n",
       "      <th>tel</th>\n",
       "      <th>type</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>B02F8007GK</td>\n",
       "      <td>西南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号</td>\n",
       "      <td>0.612624</td>\n",
       "      <td>中山市人民政府</td>\n",
       "      <td>113.392517,22.517024</td>\n",
       "      <td>74.2384</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>B02F8025U9</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.206985</td>\n",
       "      <td>中共中山市委员会</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>0760-88322220</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>B02F800L06</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.319792</td>\n",
       "      <td>中山市纪律检查委员会</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>0760-88312739</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>B02F802UB1</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院5层</td>\n",
       "      <td>0.281316</td>\n",
       "      <td>中山市发展和改革局</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>0760-88328407</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>B02F800IL3</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.361177</td>\n",
       "      <td>中山市物价局</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>0760-88319851</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>B02F800FWB</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.379006</td>\n",
       "      <td>中山市人事局</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>B02F800JWZ</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.267135</td>\n",
       "      <td>中山市信访局</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>B02F8008Q3</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.384902</td>\n",
       "      <td>中山市统计局</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>B02F800EUB</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.326743</td>\n",
       "      <td>中山市科技局</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>0760-88315063</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>B02F800IC8</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.21115</td>\n",
       "      <td>中山市外事局</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B02F800E72</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.41022</td>\n",
       "      <td>中山市监察局</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>B02F8037XS</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院3层</td>\n",
       "      <td>0.364049</td>\n",
       "      <td>中山市知识产权局</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>B02F802BBP</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.311057</td>\n",
       "      <td>中山市老干部局(兴龙街)</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>B02F800BTD</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.252587</td>\n",
       "      <td>中山市发展计划局</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>B02F800GQE</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.358402</td>\n",
       "      <td>中山市审计局(兴龙街)</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>B02F800FCO</td>\n",
       "      <td>南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号市政府大院</td>\n",
       "      <td>0.12303</td>\n",
       "      <td>中山市民族宗教事务局(兴龙街)</td>\n",
       "      <td>113.392770,22.517585</td>\n",
       "      <td>6.78388</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>B02F801B65</td>\n",
       "      <td>西北</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>兴中道15号</td>\n",
       "      <td>0.48</td>\n",
       "      <td>中山市城市建设档案馆(兴中道)</td>\n",
       "      <td>113.391334,22.518526</td>\n",
       "      <td>178.117</td>\n",
       "      <td>[]</td>\n",
       "      <td>科教文化服务;档案馆;档案馆</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>B02F80QPCE</td>\n",
       "      <td>东南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>三乡镇松苑路1号</td>\n",
       "      <td>0.043686</td>\n",
       "      <td>中山市经济和信息化局</td>\n",
       "      <td>113.393600,22.516977</td>\n",
       "      <td>112.161</td>\n",
       "      <td>0760-88315312</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>B0FFG9ZNYV</td>\n",
       "      <td>东南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>兴龙街与细柏山下街交叉口西南100米</td>\n",
       "      <td>0.241479</td>\n",
       "      <td>中山市政府大楼</td>\n",
       "      <td>113.393639,22.516979</td>\n",
       "      <td>115.045</td>\n",
       "      <td>[]</td>\n",
       "      <td>商务住宅;楼宇;商务写字楼</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>B0FFHMWLPV</td>\n",
       "      <td>东北</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>兴龙街61号</td>\n",
       "      <td>0.171091</td>\n",
       "      <td>中山市嘉艺雅学画馆</td>\n",
       "      <td>113.393448,22.518154</td>\n",
       "      <td>88.7927</td>\n",
       "      <td>18218095103</td>\n",
       "      <td>科教文化服务;培训机构;培训机构</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>B02F80Q2VN</td>\n",
       "      <td>东</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>龙井街</td>\n",
       "      <td>0.163821</td>\n",
       "      <td>百家筝鸣古筝艺术中心(东区分校)</td>\n",
       "      <td>113.394168,22.518076</td>\n",
       "      <td>150.238</td>\n",
       "      <td>0760-88829100;0760-88879100</td>\n",
       "      <td>科教文化服务;培训机构;培训机构</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>21</th>\n",
       "      <td>B02F800Z51</td>\n",
       "      <td>东</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>龙井街32号3卡</td>\n",
       "      <td>0.167293</td>\n",
       "      <td>墨仙书画创作展示馆</td>\n",
       "      <td>113.394409,22.517627</td>\n",
       "      <td>167.136</td>\n",
       "      <td>0760-88316316</td>\n",
       "      <td>科教文化服务;科教文化场所;科教文化场所</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>22</th>\n",
       "      <td>B02F80Q6JM</td>\n",
       "      <td>东南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号正西方向115米</td>\n",
       "      <td>0.224258</td>\n",
       "      <td>中共中山市委中山市人民政府群众来访接待室</td>\n",
       "      <td>113.393465,22.516141</td>\n",
       "      <td>181.356</td>\n",
       "      <td>0760-88365337</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>23</th>\n",
       "      <td>B0FFGBB5JO</td>\n",
       "      <td>东北</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>细柏山兴龙街51号</td>\n",
       "      <td>0.266288</td>\n",
       "      <td>梁宅</td>\n",
       "      <td>113.393350,22.518197</td>\n",
       "      <td>84.6875</td>\n",
       "      <td>[]</td>\n",
       "      <td>商务住宅;住宅区;住宅小区</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>24</th>\n",
       "      <td>B02F80QN9C</td>\n",
       "      <td>西北</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>兴中道15号</td>\n",
       "      <td>0.249433</td>\n",
       "      <td>中山市人民防空办公室</td>\n",
       "      <td>113.391221,22.518560</td>\n",
       "      <td>189.892</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>25</th>\n",
       "      <td>B02F802OT1</td>\n",
       "      <td>东南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号</td>\n",
       "      <td>0.114001</td>\n",
       "      <td>中山市人民政府行政复议委员会办公室复议案件受理点</td>\n",
       "      <td>113.393465,22.516141</td>\n",
       "      <td>181.356</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>26</th>\n",
       "      <td>B0FFFP07RK</td>\n",
       "      <td>东北</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>兴龙街59号</td>\n",
       "      <td>0.163173</td>\n",
       "      <td>中山市彩莹文化传播有限公司</td>\n",
       "      <td>113.393705,22.518117</td>\n",
       "      <td>108.373</td>\n",
       "      <td>0760-88830785</td>\n",
       "      <td>科教文化服务;传媒机构;传媒机构</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27</th>\n",
       "      <td>B0FFKYFCMW</td>\n",
       "      <td>西南</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>松苑路1号</td>\n",
       "      <td>0.223911</td>\n",
       "      <td>中山市档案局</td>\n",
       "      <td>113.392738,22.517576</td>\n",
       "      <td>8.88863</td>\n",
       "      <td>[]</td>\n",
       "      <td>政府机构及社会团体;政府机关;地市级政府及事业单位</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>28</th>\n",
       "      <td>B02F80Q6TO</td>\n",
       "      <td>西北</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>东区兴龙街11-13号</td>\n",
       "      <td>0.180197</td>\n",
       "      <td>中山市众联信息科技有限公司</td>\n",
       "      <td>113.391825,22.518349</td>\n",
       "      <td>125.656</td>\n",
       "      <td>18923310088</td>\n",
       "      <td>公司企业;公司;公司</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29</th>\n",
       "      <td>B0FFH0MOZI</td>\n",
       "      <td>东北</td>\n",
       "      <td>竹苑</td>\n",
       "      <td>兴龙街55号</td>\n",
       "      <td>0.170713</td>\n",
       "      <td>广州市市政工程监理有限公司</td>\n",
       "      <td>113.393465,22.518149</td>\n",
       "      <td>89.7928</td>\n",
       "      <td>[]</td>\n",
       "      <td>公司企业;公司;公司</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            id direction businessarea             address poiweight  \\\n",
       "0   B02F8007GK        西南           竹苑               松苑路1号  0.612624   \n",
       "1   B02F8025U9         南           竹苑          松苑路1号市政府大院  0.206985   \n",
       "2   B02F800L06         南           竹苑          松苑路1号市政府大院  0.319792   \n",
       "3   B02F802UB1         南           竹苑        松苑路1号市政府大院5层  0.281316   \n",
       "4   B02F800IL3         南           竹苑          松苑路1号市政府大院  0.361177   \n",
       "5   B02F800FWB         南           竹苑          松苑路1号市政府大院  0.379006   \n",
       "6   B02F800JWZ         南           竹苑          松苑路1号市政府大院  0.267135   \n",
       "7   B02F8008Q3         南           竹苑          松苑路1号市政府大院  0.384902   \n",
       "8   B02F800EUB         南           竹苑          松苑路1号市政府大院  0.326743   \n",
       "9   B02F800IC8         南           竹苑          松苑路1号市政府大院   0.21115   \n",
       "10  B02F800E72         南           竹苑          松苑路1号市政府大院   0.41022   \n",
       "11  B02F8037XS         南           竹苑        松苑路1号市政府大院3层  0.364049   \n",
       "12  B02F802BBP         南           竹苑          松苑路1号市政府大院  0.311057   \n",
       "13  B02F800BTD         南           竹苑          松苑路1号市政府大院  0.252587   \n",
       "14  B02F800GQE         南           竹苑          松苑路1号市政府大院  0.358402   \n",
       "15  B02F800FCO         南           竹苑          松苑路1号市政府大院   0.12303   \n",
       "16  B02F801B65        西北           竹苑              兴中道15号      0.48   \n",
       "17  B02F80QPCE        东南           竹苑            三乡镇松苑路1号  0.043686   \n",
       "18  B0FFG9ZNYV        东南           竹苑  兴龙街与细柏山下街交叉口西南100米  0.241479   \n",
       "19  B0FFHMWLPV        东北           竹苑              兴龙街61号  0.171091   \n",
       "20  B02F80Q2VN         东           竹苑                 龙井街  0.163821   \n",
       "21  B02F800Z51         东           竹苑            龙井街32号3卡  0.167293   \n",
       "22  B02F80Q6JM        东南           竹苑       松苑路1号正西方向115米  0.224258   \n",
       "23  B0FFGBB5JO        东北           竹苑           细柏山兴龙街51号  0.266288   \n",
       "24  B02F80QN9C        西北           竹苑              兴中道15号  0.249433   \n",
       "25  B02F802OT1        东南           竹苑               松苑路1号  0.114001   \n",
       "26  B0FFFP07RK        东北           竹苑              兴龙街59号  0.163173   \n",
       "27  B0FFKYFCMW        西南           竹苑               松苑路1号  0.223911   \n",
       "28  B02F80Q6TO        西北           竹苑         东区兴龙街11-13号  0.180197   \n",
       "29  B0FFH0MOZI        东北           竹苑              兴龙街55号  0.170713   \n",
       "\n",
       "                        name              location distance  \\\n",
       "0                    中山市人民政府  113.392517,22.517024  74.2384   \n",
       "1                   中共中山市委员会  113.392770,22.517585  6.78388   \n",
       "2                 中山市纪律检查委员会  113.392770,22.517585  6.78388   \n",
       "3                  中山市发展和改革局  113.392770,22.517585  6.78388   \n",
       "4                     中山市物价局  113.392770,22.517585  6.78388   \n",
       "5                     中山市人事局  113.392770,22.517585  6.78388   \n",
       "6                     中山市信访局  113.392770,22.517585  6.78388   \n",
       "7                     中山市统计局  113.392770,22.517585  6.78388   \n",
       "8                     中山市科技局  113.392770,22.517585  6.78388   \n",
       "9                     中山市外事局  113.392770,22.517585  6.78388   \n",
       "10                    中山市监察局  113.392770,22.517585  6.78388   \n",
       "11                  中山市知识产权局  113.392770,22.517585  6.78388   \n",
       "12              中山市老干部局(兴龙街)  113.392770,22.517585  6.78388   \n",
       "13                  中山市发展计划局  113.392770,22.517585  6.78388   \n",
       "14               中山市审计局(兴龙街)  113.392770,22.517585  6.78388   \n",
       "15           中山市民族宗教事务局(兴龙街)  113.392770,22.517585  6.78388   \n",
       "16           中山市城市建设档案馆(兴中道)  113.391334,22.518526  178.117   \n",
       "17                中山市经济和信息化局  113.393600,22.516977  112.161   \n",
       "18                   中山市政府大楼  113.393639,22.516979  115.045   \n",
       "19                 中山市嘉艺雅学画馆  113.393448,22.518154  88.7927   \n",
       "20          百家筝鸣古筝艺术中心(东区分校)  113.394168,22.518076  150.238   \n",
       "21                 墨仙书画创作展示馆  113.394409,22.517627  167.136   \n",
       "22      中共中山市委中山市人民政府群众来访接待室  113.393465,22.516141  181.356   \n",
       "23                        梁宅  113.393350,22.518197  84.6875   \n",
       "24                中山市人民防空办公室  113.391221,22.518560  189.892   \n",
       "25  中山市人民政府行政复议委员会办公室复议案件受理点  113.393465,22.516141  181.356   \n",
       "26             中山市彩莹文化传播有限公司  113.393705,22.518117  108.373   \n",
       "27                    中山市档案局  113.392738,22.517576  8.88863   \n",
       "28             中山市众联信息科技有限公司  113.391825,22.518349  125.656   \n",
       "29             广州市市政工程监理有限公司  113.393465,22.518149  89.7928   \n",
       "\n",
       "                            tel                       type  \n",
       "0                            []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "1                 0760-88322220  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "2                 0760-88312739  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "3                 0760-88328407  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "4                 0760-88319851  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "5                            []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "6                            []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "7                            []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "8                 0760-88315063  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "9                            []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "10                           []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "11                           []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "12                           []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "13                           []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "14                           []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "15                           []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "16                           []             科教文化服务;档案馆;档案馆  \n",
       "17                0760-88315312  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "18                           []              商务住宅;楼宇;商务写字楼  \n",
       "19                  18218095103           科教文化服务;培训机构;培训机构  \n",
       "20  0760-88829100;0760-88879100           科教文化服务;培训机构;培训机构  \n",
       "21                0760-88316316       科教文化服务;科教文化场所;科教文化场所  \n",
       "22                0760-88365337  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "23                           []              商务住宅;住宅区;住宅小区  \n",
       "24                           []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "25                           []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "26                0760-88830785           科教文化服务;传媒机构;传媒机构  \n",
       "27                           []  政府机构及社会团体;政府机关;地市级政府及事业单位  \n",
       "28                  18923310088                 公司企业;公司;公司  \n",
       "29                           []                 公司企业;公司;公司  "
      ]
     },
     "execution_count": 245,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(r.json()['regeocode']['pois']) #放入列表中"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 路径规划\n",
    "- 路径规划API是一套以HTTP形式提供的步行、公交、驾车查询及行驶距离计算接口，返回JSON 或 XML格式的查询数据，用于实现路径规划功能的开发。 \n",
    "1. 第一步，申请”Web服务API”密钥（Key）；\n",
    "2. 第二步，拼接HTTP请求URL，第一步申请的Key需作为必填参数一同发送；\n",
    "3. 第三步，接收HTTP请求返回的数据（JSON或XML格式），解析数据。\n",
    "\n",
    "### 准备工作\n",
    "- 步行url:https://restapi.amap.com/v3/direction/walking?parameters\n",
    "- 公交url:https://restapi.amap.com/v3/direction/transit/integrated?parameters\n",
    "- 驾车url:\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 246,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 准备起始点和终点\n",
    "start_add = \"广东省广州市中山大学南方学院\"\n",
    "stop_add = \"广州市从化区龙岗\""
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 247,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 函数\n",
    "def geocode(key,address,city=None):\n",
    "    \"\"\"高德api地理编码获取\"\"\"\n",
    "    url = \"https://restapi.amap.com/v3/direction/walking?parameters\"\n",
    "    params_geocode = {\n",
    "    \"key\": xiaoliu_map,\n",
    "    \"address\": address\n",
    "    \n",
    "}\n",
    "    response = requests.get(url=url_geocode,params=params_geocode)\n",
    "    return response.json()['geocodes'][0]['location']\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 248,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.679287,23.632575'"
      ]
     },
     "execution_count": 248,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "起始点_中大南方 = geocode(xiaoliu_map,start_add)\n",
    "起始点_中大南方"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 249,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.668051,23.600869'"
      ]
     },
     "execution_count": 249,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "目的地_龙岗 = geocode(xiaoliu_map,stop_add)\n",
    "目的地_龙岗"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 步行"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 250,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 250,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "url = \"https://restapi.amap.com/v3/direction/walking?parameters\"\n",
    "params = {\n",
    "    \"key\":xiaoliu_map,\n",
    "    \"origin\":起始点_中大南方,\n",
    "    \"destination\":目的地_龙岗\n",
    "}\n",
    "r = requests.get(url,params)\n",
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 251,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'distance': '4957',\n",
       "  'duration': '3966',\n",
       "  'steps': [{'instruction': '向东步行101米右转',\n",
       "    'orientation': '东',\n",
       "    'road': [],\n",
       "    'distance': '101',\n",
       "    'duration': '81',\n",
       "    'polyline': '113.679592,23.632491;113.680586,23.632522',\n",
       "    'action': '右转',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '向南步行199米向右前方行走',\n",
       "    'orientation': '南',\n",
       "    'road': [],\n",
       "    'distance': '199',\n",
       "    'duration': '159',\n",
       "    'polyline': '113.680586,23.632522;113.680638,23.63214;113.680668,23.63174;113.680634,23.631541;113.68059,23.631437;113.68059,23.631437;113.680499,23.631241;113.680408,23.631094;113.680208,23.630842',\n",
       "    'action': '向右前方行走',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '向西步行159米左转',\n",
       "    'orientation': '西',\n",
       "    'road': [],\n",
       "    'distance': '159',\n",
       "    'duration': '127',\n",
       "    'polyline': '113.680204,23.630838;113.680035,23.630773;113.680035,23.630773;113.679644,23.630638;113.679644,23.630638;113.679362,23.630521;113.679201,23.630473;113.679201,23.630473;113.679032,23.63043;113.679032,23.63043;113.67888,23.630404;113.67888,23.630404;113.678711,23.630365',\n",
       "    'action': '左转',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '向南步行237米左转',\n",
       "    'orientation': '南',\n",
       "    'road': [],\n",
       "    'distance': '237',\n",
       "    'duration': '190',\n",
       "    'polyline': '113.678711,23.63036;113.678711,23.62934;113.678711,23.62934;113.678711,23.629193;113.678689,23.629084;113.678637,23.629023;113.678424,23.628902;113.678368,23.628841;113.678316,23.628724;113.678294,23.628611;113.678294,23.628611;113.678277,23.628372',\n",
       "    'action': '左转',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '向南步行498米向右前方行走',\n",
       "    'orientation': '南',\n",
       "    'road': [],\n",
       "    'distance': '498',\n",
       "    'duration': '398',\n",
       "    'polyline': '113.678273,23.628368;113.678572,23.628338;113.678685,23.628307;113.678685,23.628307;113.678845,23.628234;113.679045,23.628073;113.679158,23.627964;113.679158,23.627964;113.679214,23.627869;113.679236,23.627778;113.67928,23.627526;113.679288,23.627322;113.679288,23.627322;113.679253,23.626853;113.679184,23.626623;113.679141,23.626497;113.679002,23.626259;113.678941,23.626176;113.678711,23.625977;113.67862,23.625864;113.678529,23.62572;113.678438,23.625191;113.678429,23.625056;113.678451,23.624939;113.678572,23.624657',\n",
       "    'action': '向右前方行走',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '向西南步行722米左转',\n",
       "    'orientation': '西南',\n",
       "    'road': [],\n",
       "    'distance': '722',\n",
       "    'duration': '578',\n",
       "    'polyline': '113.678572,23.624653;113.678559,23.62451;113.678416,23.624323;113.678416,23.624323;113.677582,23.623793;113.676532,23.623346;113.676363,23.623255;113.676272,23.623151;113.676111,23.622834;113.676042,23.622739;113.67579,23.622483;113.675499,23.622279;113.675417,23.622174;113.675386,23.622088;113.675378,23.621836;113.675378,23.621836;113.675391,23.62161;113.675434,23.621476;113.675543,23.621359;113.675764,23.621181;113.675846,23.621089;113.675903,23.620994;113.675907,23.620855;113.675877,23.620725;113.675747,23.620547;113.675599,23.620373;113.675243,23.620013',\n",
       "    'action': '左转',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '向东南步行412米向右前方行走',\n",
       "    'orientation': '东南',\n",
       "    'road': [],\n",
       "    'distance': '412',\n",
       "    'duration': '330',\n",
       "    'polyline': '113.675239,23.620009;113.67549,23.620013;113.675642,23.619991;113.675773,23.619948;113.676016,23.619796;113.676901,23.619193;113.677261,23.618785;113.678069,23.61783;113.678069,23.61783;113.678181,23.617656',\n",
       "    'action': '向右前方行走',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '沿乌土街向南步行1381米右转',\n",
       "    'orientation': '南',\n",
       "    'road': '乌土街',\n",
       "    'distance': '1381',\n",
       "    'duration': '1105',\n",
       "    'polyline': '113.678181,23.617652;113.678095,23.617205;113.678051,23.617075;113.677973,23.616923;113.677743,23.616558;113.677609,23.616289;113.677391,23.615816;113.677339,23.615668;113.67714,23.614826;113.677049,23.614323;113.676927,23.613359;113.676845,23.612786;113.676602,23.611489;113.676415,23.610438;113.676411,23.610265;113.676411,23.610265;113.676489,23.609848;113.676502,23.609622;113.676493,23.609236;113.676415,23.608746;113.676415,23.608485;113.67648,23.60819;113.67661,23.607734;113.676819,23.606736;113.676862,23.606541;113.676914,23.606415;113.677014,23.606254;113.677535,23.605673',\n",
       "    'action': '右转',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '沿乌土街向西南步行165米直行',\n",
       "    'orientation': '西南',\n",
       "    'road': '乌土街',\n",
       "    'distance': '165',\n",
       "    'duration': '132',\n",
       "    'polyline': '113.677535,23.605668;113.676988,23.605373;113.676402,23.605;113.676163,23.604887',\n",
       "    'action': '直行',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '沿934县道向西步行118米直行',\n",
       "    'orientation': '西',\n",
       "    'road': '934县道',\n",
       "    'distance': '118',\n",
       "    'duration': '94',\n",
       "    'polyline': '113.676159,23.604883;113.675799,23.604805;113.675508,23.604779;113.675508,23.604779;113.675013,23.60474',\n",
       "    'action': '直行',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '沿桃园东路向西南步行674米向右前方行走',\n",
       "    'orientation': '西南',\n",
       "    'road': '桃园东路',\n",
       "    'distance': '674',\n",
       "    'duration': '539',\n",
       "    'polyline': '113.675009,23.604735;113.674236,23.604683;113.673893,23.604618;113.673464,23.604492;113.673464,23.604492;113.67168,23.604006;113.671541,23.603958;113.671411,23.603854;113.671068,23.603472;113.670807,23.603264;113.670807,23.603264;113.670525,23.603073;113.6702,23.602904;113.6702,23.602904;113.670022,23.602795;113.670022,23.602795;113.669909,23.602682;113.669818,23.602517;113.669787,23.602413;113.669718,23.601901',\n",
       "    'action': '向右前方行走',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '沿桃园东路向西南步行247米右转',\n",
       "    'orientation': '西南',\n",
       "    'road': '桃园东路',\n",
       "    'distance': '247',\n",
       "    'duration': '198',\n",
       "    'polyline': '113.669714,23.601897;113.66964,23.601771;113.66964,23.601771;113.669488,23.601558;113.669488,23.601558;113.668789,23.600859;113.668663,23.600768;113.668663,23.600768;113.668442,23.600647;113.667947,23.600417',\n",
       "    'action': '右转',\n",
       "    'assistant_action': [],\n",
       "    'walk_type': '0'},\n",
       "   {'instruction': '沿龙泉路向北步行44米到达目的地',\n",
       "    'orientation': '北',\n",
       "    'road': '龙泉路',\n",
       "    'distance': '44',\n",
       "    'duration': '35',\n",
       "    'polyline': '113.667943,23.600412;113.667812,23.600794',\n",
       "    'action': [],\n",
       "    'assistant_action': '到达目的地',\n",
       "    'walk_type': '0'}]}]"
      ]
     },
     "execution_count": 251,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()['route']['paths']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 252,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'ok',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'route': {'origin': '113.679287,23.632575',\n",
       "  'destination': '113.668051,23.600869',\n",
       "  'paths': [{'distance': '4957',\n",
       "    'duration': '3966',\n",
       "    'steps': [{'instruction': '向东步行101米右转',\n",
       "      'orientation': '东',\n",
       "      'road': [],\n",
       "      'distance': '101',\n",
       "      'duration': '81',\n",
       "      'polyline': '113.679592,23.632491;113.680586,23.632522',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行199米向右前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '199',\n",
       "      'duration': '159',\n",
       "      'polyline': '113.680586,23.632522;113.680638,23.63214;113.680668,23.63174;113.680634,23.631541;113.68059,23.631437;113.68059,23.631437;113.680499,23.631241;113.680408,23.631094;113.680208,23.630842',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西步行159米左转',\n",
       "      'orientation': '西',\n",
       "      'road': [],\n",
       "      'distance': '159',\n",
       "      'duration': '127',\n",
       "      'polyline': '113.680204,23.630838;113.680035,23.630773;113.680035,23.630773;113.679644,23.630638;113.679644,23.630638;113.679362,23.630521;113.679201,23.630473;113.679201,23.630473;113.679032,23.63043;113.679032,23.63043;113.67888,23.630404;113.67888,23.630404;113.678711,23.630365',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行237米左转',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '237',\n",
       "      'duration': '190',\n",
       "      'polyline': '113.678711,23.63036;113.678711,23.62934;113.678711,23.62934;113.678711,23.629193;113.678689,23.629084;113.678637,23.629023;113.678424,23.628902;113.678368,23.628841;113.678316,23.628724;113.678294,23.628611;113.678294,23.628611;113.678277,23.628372',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向南步行498米向右前方行走',\n",
       "      'orientation': '南',\n",
       "      'road': [],\n",
       "      'distance': '498',\n",
       "      'duration': '398',\n",
       "      'polyline': '113.678273,23.628368;113.678572,23.628338;113.678685,23.628307;113.678685,23.628307;113.678845,23.628234;113.679045,23.628073;113.679158,23.627964;113.679158,23.627964;113.679214,23.627869;113.679236,23.627778;113.67928,23.627526;113.679288,23.627322;113.679288,23.627322;113.679253,23.626853;113.679184,23.626623;113.679141,23.626497;113.679002,23.626259;113.678941,23.626176;113.678711,23.625977;113.67862,23.625864;113.678529,23.62572;113.678438,23.625191;113.678429,23.625056;113.678451,23.624939;113.678572,23.624657',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向西南步行722米左转',\n",
       "      'orientation': '西南',\n",
       "      'road': [],\n",
       "      'distance': '722',\n",
       "      'duration': '578',\n",
       "      'polyline': '113.678572,23.624653;113.678559,23.62451;113.678416,23.624323;113.678416,23.624323;113.677582,23.623793;113.676532,23.623346;113.676363,23.623255;113.676272,23.623151;113.676111,23.622834;113.676042,23.622739;113.67579,23.622483;113.675499,23.622279;113.675417,23.622174;113.675386,23.622088;113.675378,23.621836;113.675378,23.621836;113.675391,23.62161;113.675434,23.621476;113.675543,23.621359;113.675764,23.621181;113.675846,23.621089;113.675903,23.620994;113.675907,23.620855;113.675877,23.620725;113.675747,23.620547;113.675599,23.620373;113.675243,23.620013',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '向东南步行412米向右前方行走',\n",
       "      'orientation': '东南',\n",
       "      'road': [],\n",
       "      'distance': '412',\n",
       "      'duration': '330',\n",
       "      'polyline': '113.675239,23.620009;113.67549,23.620013;113.675642,23.619991;113.675773,23.619948;113.676016,23.619796;113.676901,23.619193;113.677261,23.618785;113.678069,23.61783;113.678069,23.61783;113.678181,23.617656',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿乌土街向南步行1381米右转',\n",
       "      'orientation': '南',\n",
       "      'road': '乌土街',\n",
       "      'distance': '1381',\n",
       "      'duration': '1105',\n",
       "      'polyline': '113.678181,23.617652;113.678095,23.617205;113.678051,23.617075;113.677973,23.616923;113.677743,23.616558;113.677609,23.616289;113.677391,23.615816;113.677339,23.615668;113.67714,23.614826;113.677049,23.614323;113.676927,23.613359;113.676845,23.612786;113.676602,23.611489;113.676415,23.610438;113.676411,23.610265;113.676411,23.610265;113.676489,23.609848;113.676502,23.609622;113.676493,23.609236;113.676415,23.608746;113.676415,23.608485;113.67648,23.60819;113.67661,23.607734;113.676819,23.606736;113.676862,23.606541;113.676914,23.606415;113.677014,23.606254;113.677535,23.605673',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿乌土街向西南步行165米直行',\n",
       "      'orientation': '西南',\n",
       "      'road': '乌土街',\n",
       "      'distance': '165',\n",
       "      'duration': '132',\n",
       "      'polyline': '113.677535,23.605668;113.676988,23.605373;113.676402,23.605;113.676163,23.604887',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿934县道向西步行118米直行',\n",
       "      'orientation': '西',\n",
       "      'road': '934县道',\n",
       "      'distance': '118',\n",
       "      'duration': '94',\n",
       "      'polyline': '113.676159,23.604883;113.675799,23.604805;113.675508,23.604779;113.675508,23.604779;113.675013,23.60474',\n",
       "      'action': '直行',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿桃园东路向西南步行674米向右前方行走',\n",
       "      'orientation': '西南',\n",
       "      'road': '桃园东路',\n",
       "      'distance': '674',\n",
       "      'duration': '539',\n",
       "      'polyline': '113.675009,23.604735;113.674236,23.604683;113.673893,23.604618;113.673464,23.604492;113.673464,23.604492;113.67168,23.604006;113.671541,23.603958;113.671411,23.603854;113.671068,23.603472;113.670807,23.603264;113.670807,23.603264;113.670525,23.603073;113.6702,23.602904;113.6702,23.602904;113.670022,23.602795;113.670022,23.602795;113.669909,23.602682;113.669818,23.602517;113.669787,23.602413;113.669718,23.601901',\n",
       "      'action': '向右前方行走',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿桃园东路向西南步行247米右转',\n",
       "      'orientation': '西南',\n",
       "      'road': '桃园东路',\n",
       "      'distance': '247',\n",
       "      'duration': '198',\n",
       "      'polyline': '113.669714,23.601897;113.66964,23.601771;113.66964,23.601771;113.669488,23.601558;113.669488,23.601558;113.668789,23.600859;113.668663,23.600768;113.668663,23.600768;113.668442,23.600647;113.667947,23.600417',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'walk_type': '0'},\n",
       "     {'instruction': '沿龙泉路向北步行44米到达目的地',\n",
       "      'orientation': '北',\n",
       "      'road': '龙泉路',\n",
       "      'distance': '44',\n",
       "      'duration': '35',\n",
       "      'polyline': '113.667943,23.600412;113.667812,23.600794',\n",
       "      'action': [],\n",
       "      'assistant_action': '到达目的地',\n",
       "      'walk_type': '0'}]}]}}"
      ]
     },
     "execution_count": 252,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 253,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>distance</th>\n",
       "      <th>duration</th>\n",
       "      <th>steps</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>4957</td>\n",
       "      <td>3966</td>\n",
       "      <td>[{'instruction': '向东步行101米右转', 'orientation': ...</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  distance duration                                              steps\n",
       "0     4957     3966  [{'instruction': '向东步行101米右转', 'orientation': ..."
      ]
     },
     "execution_count": 253,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pd.json_normalize(r.json()['route']['paths']) #放入列表中"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 公交车\n",
    "\n",
    "#### 准备工作\n",
    "1. url：https://restapi.amap.com/v3/direction/transit/integrated?parameters\n",
    "2. requests.get\n",
    "3. key, origin, destination, city"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 254,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.679287,23.632575'"
      ]
     },
     "execution_count": 254,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数据准备起点\n",
    "origin = geocode(xiaoliu_map, \"广东省广州市中山大学南方学院\")\n",
    "origin"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 255,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.586605,23.548852'"
      ]
     },
     "execution_count": 255,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数据准备终点\n",
    "destination = geocode(xiaoliu_map,\"广东省广州市从化区东风地铁站\")\n",
    "destination"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 256,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 公交路径规划\n",
    "bus_url = 'https://restapi.amap.com/v3/direction/transit/integrated?parameters'\n",
    "#参数\n",
    "params = {\n",
    "        'key':xiaoliu_map,\n",
    "        'origin':origin,\n",
    "        'destination':destination,\n",
    "        'city':'广州'\n",
    "    }\n",
    "\n",
    "r = requests.get(bus_url, params=params)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 257,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 257,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 258,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '4',\n",
       " 'route': {'origin': '113.679287,23.632575',\n",
       "  'destination': '113.586605,23.548852',\n",
       "  'distance': '17154',\n",
       "  'taxi_cost': '48',\n",
       "  'transits': [{'cost': '3.0',\n",
       "    'duration': '4672',\n",
       "    'nightflag': '0',\n",
       "    'walking_distance': '832',\n",
       "    'distance': '19750',\n",
       "    'missed': '1',\n",
       "    'segments': [{'taxi': [],\n",
       "      'walking': {'origin': '113.679016,23.632349',\n",
       "       'destination': '113.676613,23.631285',\n",
       "       'distance': '513',\n",
       "       'duration': '439',\n",
       "       'steps': [{'instruction': '步行57米右转',\n",
       "         'road': [],\n",
       "         'distance': '57',\n",
       "         'duration': [],\n",
       "         'polyline': '113.679016,23.632349;113.678528,23.632097',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行47米向左前方行走',\n",
       "         'road': [],\n",
       "         'distance': '47',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678528,23.632092;113.678398,23.632166;113.678101,23.632261',\n",
       "         'action': '向左前方行走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行218米左转',\n",
       "         'road': [],\n",
       "         'distance': '218',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678101,23.632261;113.677834,23.632261;113.677551,23.632200;113.677399,23.632179;113.677284,23.632200;113.677177,23.632244;113.677017,23.632357;113.676811,23.632534;113.676582,23.632778;113.676430,23.632904;113.676292,23.632969',\n",
       "         'action': '左转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿博学路步行191米到达中大南方学院',\n",
       "         'road': '博学路',\n",
       "         'distance': '191',\n",
       "         'duration': [],\n",
       "         'polyline': '113.676285,23.632969;113.676292,23.632227;113.676338,23.631948;113.676430,23.631676;113.676491,23.631540;113.676613,23.631285',\n",
       "         'action': [],\n",
       "         'assistant_action': '到达中大南方学院'}]},\n",
       "      'bus': {'buslines': [{'departure_stop': {'name': '中大南方学院',\n",
       "          'id': '900000111141002',\n",
       "          'location': '113.676613,23.631281'},\n",
       "         'arrival_stop': {'name': '凤院北',\n",
       "          'id': '900000111141025',\n",
       "          'location': '113.612526,23.553211'},\n",
       "         'name': '从15路(中大南方学院--从化汽车站总站)',\n",
       "         'id': '900000111141',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '15832',\n",
       "         'duration': '2799',\n",
       "         'polyline': '113.676613,23.631281;113.676460,23.631588;113.676430,23.631672;113.676338,23.631945;113.676292,23.632223;113.676285,23.632969;113.676285,23.633560;113.676300,23.633738;113.676331,23.633875;113.676399,23.634016;113.676460,23.634111;113.676521,23.634193;113.676781,23.634409;113.676857,23.634357;113.676933,23.634340;113.677032,23.634354;113.677094,23.634396;113.677139,23.634459;113.677147,23.634535;113.677139,23.634600;113.677086,23.634663;113.677032,23.634701;113.676918,23.634718;113.676857,23.634701;113.676788,23.634657;113.675262,23.636129;113.675156,23.636263;113.675026,23.636467;113.674973,23.636566;113.674957,23.636702;113.674957,23.636845;113.674995,23.636995;113.675377,23.637886;113.675430,23.638042;113.675522,23.638659;113.675529,23.638998;113.675514,23.639132;113.675446,23.639311;113.675331,23.639582;113.675102,23.640036;113.675003,23.640186;113.674309,23.641024;113.673347,23.642139;113.672981,23.642536;113.672935,23.642578;113.672173,23.643307;113.671707,23.643766;113.671432,23.644045;113.673103,23.644968;113.674362,23.645651;113.675461,23.646276;113.675964,23.646635;113.676407,23.647018;113.676376,23.647089;113.675964,23.646744;113.675735,23.646566;113.675468,23.646385;113.675095,23.646172;113.673004,23.645004;113.669968,23.643330;113.669167,23.642881;113.668770,23.642673;113.668594,23.642578;113.667007,23.641693;113.666145,23.641171;113.665314,23.640564;113.665253,23.640511;113.665016,23.640301;113.664772,23.640064;113.664551,23.639812;113.664406,23.639662;113.664207,23.639400;113.663925,23.639021;113.663574,23.638451;113.663361,23.638020;113.662323,23.635933;113.661949,23.635181;113.661461,23.634266;113.661224,23.633898;113.660843,23.633383;113.660683,23.633192;113.660248,23.632704;113.659721,23.632172;113.659370,23.631880;113.659256,23.631794;113.658989,23.631588;113.658897,23.631519;113.658211,23.631102;113.657707,23.630760;113.657425,23.630590;113.656944,23.630304;113.656940,23.630304;113.654336,23.628741;113.653850,23.628416;113.653598,23.628225;113.652383,23.627179;113.650165,23.625326;113.650022,23.625221;113.649766,23.625013;113.649731,23.624987;113.649731,23.624983;113.648980,23.624384;113.648611,23.624063;113.647843,23.623442;113.647361,23.623090;113.646780,23.622721;113.646345,23.622465;113.645981,23.622287;113.645595,23.622131;113.645117,23.621992;113.644709,23.621914;113.644640,23.621901;113.644635,23.621901;113.644375,23.621862;113.643255,23.621749;113.642578,23.621667;113.642474,23.621645;113.642027,23.621541;113.641450,23.621354;113.640525,23.621033;113.639332,23.620603;113.639184,23.620543;113.638850,23.620412;113.638433,23.620213;113.638325,23.620156;113.638329,23.620155;113.636047,23.618944;113.635544,23.618668;113.635254,23.618481;113.634750,23.618097;113.634514,23.617891;113.634254,23.617622;113.633980,23.617271;113.633636,23.616779;113.633057,23.615911;113.632957,23.615774;113.632401,23.614927;113.631912,23.614172;113.631660,23.613710;113.631432,23.613142;113.631287,23.612659;113.630905,23.611076;113.630844,23.610802;113.630844,23.610798;113.630768,23.610516;113.630661,23.610060;113.630569,23.609705;113.630554,23.609617;113.630501,23.609388;113.630119,23.607822;113.629776,23.606388;113.629395,23.604740;113.628891,23.602587;113.628479,23.600821;113.628136,23.599293;113.627968,23.598680;113.627953,23.598633;113.627884,23.598433;113.627785,23.598202;113.627632,23.597919;113.627487,23.597683;113.627281,23.597401;113.627037,23.597139;113.626106,23.596230;113.625641,23.595755;113.624992,23.595139;113.624092,23.594326;113.623161,23.593433;113.622879,23.593147;113.622734,23.592981;113.622383,23.592590;113.622055,23.592186;113.621872,23.591957;113.621574,23.591545;113.621292,23.591133;113.621117,23.590864;113.620880,23.590433;113.620735,23.590164;113.620674,23.590054;113.620673,23.590052;113.620603,23.589913;113.619475,23.587643;113.619401,23.587491;113.619401,23.587487;113.619175,23.587040;113.618984,23.586658;113.618893,23.586471;113.618598,23.585868;113.618108,23.584874;113.617930,23.584440;113.617769,23.583928;113.617708,23.583646;113.617630,23.583073;113.617582,23.582478;113.617578,23.582357;113.617578,23.582361;113.617584,23.582365;113.617584,23.582359;113.617554,23.581884;113.617485,23.580811;113.617477,23.580591;113.617485,23.580204;113.617493,23.579849;113.617554,23.579384;113.617668,23.578743;113.617760,23.578316;113.617790,23.578138;113.618042,23.576904;113.618080,23.576723;113.618095,23.576658;113.618118,23.576557;113.618187,23.576189;113.618347,23.575378;113.618416,23.574808;113.618423,23.574497;113.618408,23.574158;113.618286,23.573481;113.618263,23.573381;113.618210,23.573103;113.618210,23.573111;113.618210,23.573120;113.618210,23.573116;113.618172,23.572929;113.618080,23.572432;113.618034,23.572153;113.618011,23.571901;113.617989,23.571444;113.618034,23.570911;113.618187,23.569813;113.618332,23.568825;113.618462,23.567951;113.618652,23.566698;113.618759,23.565947;113.618790,23.565674;113.618828,23.565474;113.618843,23.565365;113.618874,23.565182;113.618896,23.565014;113.618896,23.564964;113.619118,23.563465;113.619171,23.563156;113.619263,23.562523;113.619286,23.562109;113.619263,23.561775;113.619232,23.561602;113.619171,23.561384;113.619011,23.561010;113.618790,23.560673;113.618652,23.560495;113.618149,23.559973;113.617950,23.559765;113.616966,23.558811;113.615730,23.557600;113.615547,23.557409;113.615356,23.557222;113.615105,23.556976;113.614723,23.556602;113.614052,23.555933;113.613762,23.555609;113.613365,23.555122;113.613190,23.554810;113.613129,23.554688;113.613052,23.554518;113.612823,23.554016;113.612648,23.553556;113.612625,23.553484;113.612602,23.553438;113.612549,23.553284;113.612526,23.553211',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0900',\n",
       "         'end_time': '1800',\n",
       "         'via_num': '13',\n",
       "         'via_stops': [{'name': '卫东',\n",
       "           'id': '900000111141003',\n",
       "           'location': '113.671707,23.643766'},\n",
       "          {'name': '交警温泉中队',\n",
       "           'id': '900000111141029',\n",
       "           'location': '113.656944,23.630304'},\n",
       "          {'name': '冲口',\n",
       "           'id': '900000111141022',\n",
       "           'location': '113.649731,23.624987'},\n",
       "          {'name': '牛步迳',\n",
       "           'id': '900000111141006',\n",
       "           'location': '113.644640,23.621901'},\n",
       "          {'name': '华辉度假村',\n",
       "           'id': '900000111141023',\n",
       "           'location': '113.638325,23.620156'},\n",
       "          {'name': '温泉镇政府',\n",
       "           'id': '900000111141008',\n",
       "           'location': '113.632957,23.615774'},\n",
       "          {'name': '云星村',\n",
       "           'id': '900000111141024',\n",
       "           'location': '113.630844,23.610802'},\n",
       "          {'name': '宣星路口',\n",
       "           'id': '900000111141010',\n",
       "           'location': '113.628891,23.602587'},\n",
       "          {'name': '新华',\n",
       "           'id': '900000111141011',\n",
       "           'location': '113.620674,23.590054'},\n",
       "          {'name': '水底村',\n",
       "           'id': '900000111141012',\n",
       "           'location': '113.619401,23.587491'},\n",
       "          {'name': '南洋学院',\n",
       "           'id': '900000111141028',\n",
       "           'location': '113.617578,23.582357'},\n",
       "          {'name': '江埔社区',\n",
       "           'id': '900000111141014',\n",
       "           'location': '113.618210,23.573103'},\n",
       "          {'name': '沙塱村',\n",
       "           'id': '900000111141015',\n",
       "           'location': '113.615547,23.557409'}]}]},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}},\n",
       "     {'taxi': [],\n",
       "      'walking': [],\n",
       "      'bus': {'buslines': [{'departure_stop': {'name': '凤院北',\n",
       "          'id': '440100014900021',\n",
       "          'location': '113.612526,23.553207'},\n",
       "         'arrival_stop': {'name': '新世纪广场',\n",
       "          'id': '440100014900010',\n",
       "          'location': '113.588799,23.548315'},\n",
       "         'name': '从7路(水利学院总站--南医大五附院总站)',\n",
       "         'id': '440100014900',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '3086',\n",
       "         'duration': '1160',\n",
       "         'polyline': '113.612526,23.553207;113.612282,23.552565;113.612068,23.551991;113.611961,23.551771;113.611816,23.551476;113.611557,23.551102;113.611328,23.550846;113.611069,23.550591;113.610451,23.550087;113.610451,23.550091;113.610451,23.550095;113.610451,23.550091;113.610435,23.550077;113.609962,23.549686;113.609459,23.549290;113.609207,23.549063;113.609055,23.548923;113.608841,23.548676;113.608452,23.548498;113.607582,23.548014;113.606888,23.547691;113.606842,23.547668;113.606499,23.547514;113.606497,23.547513;113.606445,23.547491;113.604735,23.546732;113.604258,23.546549;113.603850,23.546424;113.603303,23.546315;113.603051,23.546289;113.602782,23.546267;113.602270,23.546280;113.601424,23.546302;113.601037,23.546324;113.600898,23.546328;113.600547,23.546350;113.600299,23.546354;113.599492,23.546393;113.599071,23.546372;113.598633,23.546350;113.598442,23.546337;113.597661,23.546306;113.597664,23.546307;113.597534,23.546303;113.597290,23.546284;113.596779,23.546215;113.596260,23.546143;113.595932,23.546085;113.595840,23.546061;113.595810,23.546055;113.595695,23.546007;113.595566,23.545874;113.595467,23.545715;113.595428,23.545610;113.595398,23.545324;113.595421,23.545177;113.595528,23.544868;113.595467,23.544701;113.595413,23.544626;113.595306,23.544531;113.595016,23.544575;113.594620,23.544676;113.592140,23.545368;113.592133,23.545534;113.592392,23.546143;113.592361,23.546253;113.591393,23.547153;113.591110,23.547373;113.590675,23.547609;113.590599,23.547651;113.590424,23.547747;113.590096,23.547930;113.589523,23.548264;113.589432,23.548285;113.589287,23.548307;113.588860,23.548325;113.588799,23.548315',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0730',\n",
       "         'end_time': '2100',\n",
       "         'via_num': '6',\n",
       "         'via_stops': [{'name': '凤院路口',\n",
       "           'id': '440100014900004',\n",
       "           'location': '113.610451,23.550087'},\n",
       "          {'name': '光导纤维厂',\n",
       "           'id': '440100014900005',\n",
       "           'location': '113.606499,23.547514'},\n",
       "          {'name': '大江路口',\n",
       "           'id': '440100014900006',\n",
       "           'location': '113.602270,23.546280'},\n",
       "          {'name': '塱仔新村',\n",
       "           'id': '440100014900007',\n",
       "           'location': '113.597661,23.546306'},\n",
       "          {'name': '河东广场',\n",
       "           'id': '440100014900008',\n",
       "           'location': '113.595840,23.546061'},\n",
       "          {'name': '河滨公园',\n",
       "           'id': '440100014900009',\n",
       "           'location': '113.590675,23.547609'}]}]},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}},\n",
       "     {'taxi': [],\n",
       "      'walking': {'origin': '113.588799,23.548315',\n",
       "       'destination': '113.586487,23.548855',\n",
       "       'distance': '318',\n",
       "       'duration': '272',\n",
       "       'steps': [{'instruction': '沿东成路步行126米往前走',\n",
       "         'road': '东成路',\n",
       "         'distance': '126',\n",
       "         'duration': [],\n",
       "         'polyline': '113.588799,23.548315;113.588615,23.548298;113.588364,23.548260;113.587570,23.548120',\n",
       "         'action': '往前走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿新城东路步行112米右转',\n",
       "         'road': '新城东路',\n",
       "         'distance': '112',\n",
       "         'duration': [],\n",
       "         'polyline': '113.587570,23.548117;113.587471,23.548107;113.586464,23.548120',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行80米',\n",
       "         'road': [],\n",
       "         'distance': '80',\n",
       "         'duration': [],\n",
       "         'polyline': '113.586464,23.548120;113.586464,23.548286;113.586479,23.548624;113.586487,23.548855',\n",
       "         'action': [],\n",
       "         'assistant_action': []}]},\n",
       "      'bus': {'buslines': []},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}}]},\n",
       "   {'cost': [],\n",
       "    'duration': '4855',\n",
       "    'nightflag': '0',\n",
       "    'walking_distance': '836',\n",
       "    'distance': '19865',\n",
       "    'missed': '1',\n",
       "    'segments': [{'taxi': [],\n",
       "      'walking': {'origin': '113.679016,23.632349',\n",
       "       'destination': '113.676613,23.631285',\n",
       "       'distance': '513',\n",
       "       'duration': '439',\n",
       "       'steps': [{'instruction': '步行57米右转',\n",
       "         'road': [],\n",
       "         'distance': '57',\n",
       "         'duration': [],\n",
       "         'polyline': '113.679016,23.632349;113.678528,23.632097',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行47米向左前方行走',\n",
       "         'road': [],\n",
       "         'distance': '47',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678528,23.632092;113.678398,23.632166;113.678101,23.632261',\n",
       "         'action': '向左前方行走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行218米左转',\n",
       "         'road': [],\n",
       "         'distance': '218',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678101,23.632261;113.677834,23.632261;113.677551,23.632200;113.677399,23.632179;113.677284,23.632200;113.677177,23.632244;113.677017,23.632357;113.676811,23.632534;113.676582,23.632778;113.676430,23.632904;113.676292,23.632969',\n",
       "         'action': '左转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿博学路步行191米到达中大南方学院',\n",
       "         'road': '博学路',\n",
       "         'distance': '191',\n",
       "         'duration': [],\n",
       "         'polyline': '113.676285,23.632969;113.676292,23.632227;113.676338,23.631948;113.676430,23.631676;113.676491,23.631540;113.676613,23.631285',\n",
       "         'action': [],\n",
       "         'assistant_action': '到达中大南方学院'}]},\n",
       "      'bus': {'buslines': [{'departure_stop': {'name': '中大南方学院',\n",
       "          'id': '900000111141002',\n",
       "          'location': '113.676613,23.631281'},\n",
       "         'arrival_stop': {'name': '江埔社区',\n",
       "          'id': '900000111141014',\n",
       "          'location': '113.618210,23.573103'},\n",
       "         'name': '从15路(中大南方学院--从化汽车站总站)',\n",
       "         'id': '900000111141',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '13472',\n",
       "         'duration': '2578',\n",
       "         'polyline': '113.676613,23.631281;113.676460,23.631588;113.676430,23.631672;113.676338,23.631945;113.676292,23.632223;113.676285,23.632969;113.676285,23.633560;113.676300,23.633738;113.676331,23.633875;113.676399,23.634016;113.676460,23.634111;113.676521,23.634193;113.676781,23.634409;113.676857,23.634357;113.676933,23.634340;113.677032,23.634354;113.677094,23.634396;113.677139,23.634459;113.677147,23.634535;113.677139,23.634600;113.677086,23.634663;113.677032,23.634701;113.676918,23.634718;113.676857,23.634701;113.676788,23.634657;113.675262,23.636129;113.675156,23.636263;113.675026,23.636467;113.674973,23.636566;113.674957,23.636702;113.674957,23.636845;113.674995,23.636995;113.675377,23.637886;113.675430,23.638042;113.675522,23.638659;113.675529,23.638998;113.675514,23.639132;113.675446,23.639311;113.675331,23.639582;113.675102,23.640036;113.675003,23.640186;113.674309,23.641024;113.673347,23.642139;113.672981,23.642536;113.672935,23.642578;113.672173,23.643307;113.671707,23.643766;113.671432,23.644045;113.673103,23.644968;113.674362,23.645651;113.675461,23.646276;113.675964,23.646635;113.676407,23.647018;113.676376,23.647089;113.675964,23.646744;113.675735,23.646566;113.675468,23.646385;113.675095,23.646172;113.673004,23.645004;113.669968,23.643330;113.669167,23.642881;113.668770,23.642673;113.668594,23.642578;113.667007,23.641693;113.666145,23.641171;113.665314,23.640564;113.665253,23.640511;113.665016,23.640301;113.664772,23.640064;113.664551,23.639812;113.664406,23.639662;113.664207,23.639400;113.663925,23.639021;113.663574,23.638451;113.663361,23.638020;113.662323,23.635933;113.661949,23.635181;113.661461,23.634266;113.661224,23.633898;113.660843,23.633383;113.660683,23.633192;113.660248,23.632704;113.659721,23.632172;113.659370,23.631880;113.659256,23.631794;113.658989,23.631588;113.658897,23.631519;113.658211,23.631102;113.657707,23.630760;113.657425,23.630590;113.656944,23.630304;113.656940,23.630304;113.654336,23.628741;113.653850,23.628416;113.653598,23.628225;113.652383,23.627179;113.650165,23.625326;113.650022,23.625221;113.649766,23.625013;113.649731,23.624987;113.649731,23.624983;113.648980,23.624384;113.648611,23.624063;113.647843,23.623442;113.647361,23.623090;113.646780,23.622721;113.646345,23.622465;113.645981,23.622287;113.645595,23.622131;113.645117,23.621992;113.644709,23.621914;113.644640,23.621901;113.644635,23.621901;113.644375,23.621862;113.643255,23.621749;113.642578,23.621667;113.642474,23.621645;113.642027,23.621541;113.641450,23.621354;113.640525,23.621033;113.639332,23.620603;113.639184,23.620543;113.638850,23.620412;113.638433,23.620213;113.638325,23.620156;113.638329,23.620155;113.636047,23.618944;113.635544,23.618668;113.635254,23.618481;113.634750,23.618097;113.634514,23.617891;113.634254,23.617622;113.633980,23.617271;113.633636,23.616779;113.633057,23.615911;113.632957,23.615774;113.632401,23.614927;113.631912,23.614172;113.631660,23.613710;113.631432,23.613142;113.631287,23.612659;113.630905,23.611076;113.630844,23.610802;113.630844,23.610798;113.630768,23.610516;113.630661,23.610060;113.630569,23.609705;113.630554,23.609617;113.630501,23.609388;113.630119,23.607822;113.629776,23.606388;113.629395,23.604740;113.628891,23.602587;113.628479,23.600821;113.628136,23.599293;113.627968,23.598680;113.627953,23.598633;113.627884,23.598433;113.627785,23.598202;113.627632,23.597919;113.627487,23.597683;113.627281,23.597401;113.627037,23.597139;113.626106,23.596230;113.625641,23.595755;113.624992,23.595139;113.624092,23.594326;113.623161,23.593433;113.622879,23.593147;113.622734,23.592981;113.622383,23.592590;113.622055,23.592186;113.621872,23.591957;113.621574,23.591545;113.621292,23.591133;113.621117,23.590864;113.620880,23.590433;113.620735,23.590164;113.620674,23.590054;113.620673,23.590052;113.620603,23.589913;113.619475,23.587643;113.619401,23.587491;113.619401,23.587487;113.619175,23.587040;113.618984,23.586658;113.618893,23.586471;113.618598,23.585868;113.618108,23.584874;113.617930,23.584440;113.617769,23.583928;113.617708,23.583646;113.617630,23.583073;113.617582,23.582478;113.617578,23.582357;113.617578,23.582361;113.617584,23.582365;113.617584,23.582359;113.617554,23.581884;113.617485,23.580811;113.617477,23.580591;113.617485,23.580204;113.617493,23.579849;113.617554,23.579384;113.617668,23.578743;113.617760,23.578316;113.617790,23.578138;113.618042,23.576904;113.618080,23.576723;113.618095,23.576658;113.618118,23.576557;113.618187,23.576189;113.618347,23.575378;113.618416,23.574808;113.618423,23.574497;113.618408,23.574158;113.618286,23.573481;113.618263,23.573381;113.618210,23.573103',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0900',\n",
       "         'end_time': '1800',\n",
       "         'via_num': '11',\n",
       "         'via_stops': [{'name': '卫东',\n",
       "           'id': '900000111141003',\n",
       "           'location': '113.671707,23.643766'},\n",
       "          {'name': '交警温泉中队',\n",
       "           'id': '900000111141029',\n",
       "           'location': '113.656944,23.630304'},\n",
       "          {'name': '冲口',\n",
       "           'id': '900000111141022',\n",
       "           'location': '113.649731,23.624987'},\n",
       "          {'name': '牛步迳',\n",
       "           'id': '900000111141006',\n",
       "           'location': '113.644640,23.621901'},\n",
       "          {'name': '华辉度假村',\n",
       "           'id': '900000111141023',\n",
       "           'location': '113.638325,23.620156'},\n",
       "          {'name': '温泉镇政府',\n",
       "           'id': '900000111141008',\n",
       "           'location': '113.632957,23.615774'},\n",
       "          {'name': '云星村',\n",
       "           'id': '900000111141024',\n",
       "           'location': '113.630844,23.610802'},\n",
       "          {'name': '宣星路口',\n",
       "           'id': '900000111141010',\n",
       "           'location': '113.628891,23.602587'},\n",
       "          {'name': '新华',\n",
       "           'id': '900000111141011',\n",
       "           'location': '113.620674,23.590054'},\n",
       "          {'name': '水底村',\n",
       "           'id': '900000111141012',\n",
       "           'location': '113.619401,23.587491'},\n",
       "          {'name': '南洋学院',\n",
       "           'id': '900000111141028',\n",
       "           'location': '113.617578,23.582357'}]}]},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}},\n",
       "     {'taxi': [],\n",
       "      'walking': {'origin': '113.618210,23.573099',\n",
       "       'destination': '113.618202,23.573051',\n",
       "       'distance': '5',\n",
       "       'duration': '4',\n",
       "       'steps': [{'instruction': '沿环市东路步行5米到达江埔社区',\n",
       "         'road': '环市东路',\n",
       "         'distance': '5',\n",
       "         'duration': [],\n",
       "         'polyline': '113.618210,23.573099;113.618202,23.573051',\n",
       "         'action': [],\n",
       "         'assistant_action': '到达江埔社区'}]},\n",
       "      'bus': {'buslines': [{'departure_stop': {'name': '江埔社区',\n",
       "          'id': '900000077947014',\n",
       "          'location': '113.618195,23.573051'},\n",
       "         'arrival_stop': {'name': '新世纪广场',\n",
       "          'id': '900000077947027',\n",
       "          'location': '113.588890,23.548321'},\n",
       "         'name': '从4路短线(温泉农贸市场--从化汽车站总站)',\n",
       "         'id': '900000077947',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '5557',\n",
       "         'duration': '1561',\n",
       "         'polyline': '113.618195,23.573051;113.618179,23.572929;113.618088,23.572496;113.618057,23.572327;113.618042,23.572153;113.618004,23.571901;113.617996,23.571598;113.617996,23.571442;113.618004,23.571232;113.618042,23.570911;113.618073,23.570568;113.618317,23.568914;113.618347,23.568768;113.618469,23.567947;113.618507,23.567574;113.618645,23.566696;113.618759,23.565947;113.618698,23.565739;113.618675,23.565678;113.618622,23.565590;113.618538,23.565521;113.618370,23.565392;113.617310,23.565460;113.614960,23.565613;113.614754,23.565556;113.613747,23.565599;113.611832,23.565725;113.608177,23.565924;113.607445,23.565968;113.607338,23.565985;113.607239,23.566015;113.607147,23.566069;113.607086,23.566120;113.607018,23.566198;113.606979,23.566246;113.606964,23.566355;113.606972,23.566423;113.607018,23.566532;113.607063,23.566589;113.607170,23.566658;113.607239,23.566685;113.607307,23.566696;113.607529,23.566692;113.608070,23.566654;113.608040,23.566120;113.607971,23.565022;113.607948,23.564657;113.607903,23.563993;113.607758,23.561975;113.607689,23.560976;113.607674,23.560760;113.607635,23.559965;113.607567,23.558090;113.607552,23.557634;113.607552,23.557491;113.607536,23.557161;113.607536,23.557158;113.607498,23.556211;113.607483,23.555820;113.607460,23.555616;113.607414,23.555439;113.607346,23.555252;113.607254,23.555079;113.607155,23.554909;113.606979,23.554726;113.606926,23.554678;113.606369,23.554157;113.606369,23.554153;113.605904,23.553724;113.605728,23.553528;113.605431,23.553143;113.605240,23.552938;113.604378,23.552135;113.604202,23.551996;113.604004,23.551863;113.603752,23.551723;113.603508,23.551615;113.603455,23.551598;113.603455,23.551594;113.603210,23.551516;113.603065,23.551476;113.602882,23.551445;113.602608,23.551414;113.602379,23.551401;113.600624,23.551394;113.599731,23.551394;113.599213,23.551397;113.599144,23.551397;113.598633,23.551394;113.598373,23.551384;113.597778,23.551397;113.596657,23.551394;113.596596,23.551384;113.596207,23.551376;113.596008,23.551353;113.595757,23.551289;113.595156,23.551252;113.595032,23.550898;113.594704,23.550690;113.594452,23.550533;113.593994,23.550255;113.593735,23.550108;113.593437,23.549923;113.593216,23.549757;113.593063,23.549587;113.593002,23.549494;113.592934,23.549240;113.592842,23.548624;113.592834,23.548433;113.592834,23.548429;113.592827,23.548269;113.592781,23.547560;113.592644,23.547079;113.592606,23.546940;113.592606,23.546944;113.592621,23.546944;113.592621,23.546940;113.592537,23.546675;113.592361,23.546249;113.591469,23.547113;113.591110,23.547375;113.590714,23.547590;113.590599,23.547651;113.590424,23.547747;113.590096,23.547930;113.589523,23.548264;113.589432,23.548285;113.589287,23.548307;113.588890,23.548321',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0800',\n",
       "         'end_time': '2000',\n",
       "         'via_num': '12',\n",
       "         'via_stops': [{'name': '江村',\n",
       "           'id': '900000077947015',\n",
       "           'location': '113.618317,23.568914'},\n",
       "          {'name': '迎宾大桥',\n",
       "           'id': '900000077947016',\n",
       "           'location': '113.617310,23.565460'},\n",
       "          {'name': '殷家庄',\n",
       "           'id': '900000077947017',\n",
       "           'location': '113.607948,23.564657'},\n",
       "          {'name': '儿童公园',\n",
       "           'id': '900000077947018',\n",
       "           'location': '113.607674,23.560760'},\n",
       "          {'name': '法院检察院站',\n",
       "           'id': '900000077947019',\n",
       "           'location': '113.607536,23.557161'},\n",
       "          {'name': '从化图书馆',\n",
       "           'id': '900000077947020',\n",
       "           'location': '113.606369,23.554157'},\n",
       "          {'name': '自来水公司',\n",
       "           'id': '900000077947021',\n",
       "           'location': '113.603455,23.551598'},\n",
       "          {'name': '从化广播电视台',\n",
       "           'id': '900000077947022',\n",
       "           'location': '113.599731,23.551394'},\n",
       "          {'name': '从化政务服务中心',\n",
       "           'id': '900000077947023',\n",
       "           'location': '113.594452,23.550533'},\n",
       "          {'name': '儿童乐园',\n",
       "           'id': '900000077947024',\n",
       "           'location': '113.592834,23.548433'},\n",
       "          {'name': '河堤广场',\n",
       "           'id': '900000077947025',\n",
       "           'location': '113.592606,23.546940'},\n",
       "          {'name': '河滨公园',\n",
       "           'id': '900000077947026',\n",
       "           'location': '113.590714,23.547590'}]}]},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}},\n",
       "     {'taxi': [],\n",
       "      'walking': {'origin': '113.588799,23.548315',\n",
       "       'destination': '113.586487,23.548855',\n",
       "       'distance': '318',\n",
       "       'duration': '272',\n",
       "       'steps': [{'instruction': '沿东成路步行126米往前走',\n",
       "         'road': '东成路',\n",
       "         'distance': '126',\n",
       "         'duration': [],\n",
       "         'polyline': '113.588799,23.548315;113.588615,23.548298;113.588364,23.548260;113.587570,23.548120',\n",
       "         'action': '往前走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿新城东路步行112米右转',\n",
       "         'road': '新城东路',\n",
       "         'distance': '112',\n",
       "         'duration': [],\n",
       "         'polyline': '113.587570,23.548117;113.587471,23.548107;113.586464,23.548120',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行80米',\n",
       "         'road': [],\n",
       "         'distance': '80',\n",
       "         'duration': [],\n",
       "         'polyline': '113.586464,23.548120;113.586464,23.548286;113.586479,23.548624;113.586487,23.548855',\n",
       "         'action': [],\n",
       "         'assistant_action': []}]},\n",
       "      'bus': {'buslines': []},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}}]},\n",
       "   {'cost': '4.0',\n",
       "    'duration': '4981',\n",
       "    'nightflag': '0',\n",
       "    'walking_distance': '779',\n",
       "    'distance': '23592',\n",
       "    'missed': '1',\n",
       "    'segments': [{'taxi': [],\n",
       "      'walking': {'origin': '113.679016,23.632349',\n",
       "       'destination': '113.676613,23.631285',\n",
       "       'distance': '513',\n",
       "       'duration': '439',\n",
       "       'steps': [{'instruction': '步行57米右转',\n",
       "         'road': [],\n",
       "         'distance': '57',\n",
       "         'duration': [],\n",
       "         'polyline': '113.679016,23.632349;113.678528,23.632097',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行47米向左前方行走',\n",
       "         'road': [],\n",
       "         'distance': '47',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678528,23.632092;113.678398,23.632166;113.678101,23.632261',\n",
       "         'action': '向左前方行走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行218米左转',\n",
       "         'road': [],\n",
       "         'distance': '218',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678101,23.632261;113.677834,23.632261;113.677551,23.632200;113.677399,23.632179;113.677284,23.632200;113.677177,23.632244;113.677017,23.632357;113.676811,23.632534;113.676582,23.632778;113.676430,23.632904;113.676292,23.632969',\n",
       "         'action': '左转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿博学路步行191米到达中大南方学院',\n",
       "         'road': '博学路',\n",
       "         'distance': '191',\n",
       "         'duration': [],\n",
       "         'polyline': '113.676285,23.632969;113.676292,23.632227;113.676338,23.631948;113.676430,23.631676;113.676491,23.631540;113.676613,23.631285',\n",
       "         'action': [],\n",
       "         'assistant_action': '到达中大南方学院'}]},\n",
       "      'bus': {'buslines': [{'departure_stop': {'name': '中大南方学院',\n",
       "          'id': '900000111141002',\n",
       "          'location': '113.676613,23.631281'},\n",
       "         'arrival_stop': {'name': '从化汽车站总站',\n",
       "          'id': '900000111141021',\n",
       "          'location': '113.599414,23.527556'},\n",
       "         'name': '从15路(中大南方学院--从化汽车站总站)',\n",
       "         'id': '900000111141',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '19692',\n",
       "         'duration': '3261',\n",
       "         'polyline': '113.676613,23.631281;113.676460,23.631588;113.676430,23.631672;113.676338,23.631945;113.676292,23.632223;113.676285,23.632969;113.676285,23.633560;113.676300,23.633738;113.676331,23.633875;113.676399,23.634016;113.676460,23.634111;113.676521,23.634193;113.676781,23.634409;113.676857,23.634357;113.676933,23.634340;113.677032,23.634354;113.677094,23.634396;113.677139,23.634459;113.677147,23.634535;113.677139,23.634600;113.677086,23.634663;113.677032,23.634701;113.676918,23.634718;113.676857,23.634701;113.676788,23.634657;113.675262,23.636129;113.675156,23.636263;113.675026,23.636467;113.674973,23.636566;113.674957,23.636702;113.674957,23.636845;113.674995,23.636995;113.675377,23.637886;113.675430,23.638042;113.675522,23.638659;113.675529,23.638998;113.675514,23.639132;113.675446,23.639311;113.675331,23.639582;113.675102,23.640036;113.675003,23.640186;113.674309,23.641024;113.673347,23.642139;113.672981,23.642536;113.672935,23.642578;113.672173,23.643307;113.671707,23.643766;113.671432,23.644045;113.673103,23.644968;113.674362,23.645651;113.675461,23.646276;113.675964,23.646635;113.676407,23.647018;113.676376,23.647089;113.675964,23.646744;113.675735,23.646566;113.675468,23.646385;113.675095,23.646172;113.673004,23.645004;113.669968,23.643330;113.669167,23.642881;113.668770,23.642673;113.668594,23.642578;113.667007,23.641693;113.666145,23.641171;113.665314,23.640564;113.665253,23.640511;113.665016,23.640301;113.664772,23.640064;113.664551,23.639812;113.664406,23.639662;113.664207,23.639400;113.663925,23.639021;113.663574,23.638451;113.663361,23.638020;113.662323,23.635933;113.661949,23.635181;113.661461,23.634266;113.661224,23.633898;113.660843,23.633383;113.660683,23.633192;113.660248,23.632704;113.659721,23.632172;113.659370,23.631880;113.659256,23.631794;113.658989,23.631588;113.658897,23.631519;113.658211,23.631102;113.657707,23.630760;113.657425,23.630590;113.656944,23.630304;113.656940,23.630304;113.654336,23.628741;113.653850,23.628416;113.653598,23.628225;113.652383,23.627179;113.650165,23.625326;113.650022,23.625221;113.649766,23.625013;113.649731,23.624987;113.649731,23.624983;113.648980,23.624384;113.648611,23.624063;113.647843,23.623442;113.647361,23.623090;113.646780,23.622721;113.646345,23.622465;113.645981,23.622287;113.645595,23.622131;113.645117,23.621992;113.644709,23.621914;113.644640,23.621901;113.644635,23.621901;113.644375,23.621862;113.643255,23.621749;113.642578,23.621667;113.642474,23.621645;113.642027,23.621541;113.641450,23.621354;113.640525,23.621033;113.639332,23.620603;113.639184,23.620543;113.638850,23.620412;113.638433,23.620213;113.638325,23.620156;113.638329,23.620155;113.636047,23.618944;113.635544,23.618668;113.635254,23.618481;113.634750,23.618097;113.634514,23.617891;113.634254,23.617622;113.633980,23.617271;113.633636,23.616779;113.633057,23.615911;113.632957,23.615774;113.632401,23.614927;113.631912,23.614172;113.631660,23.613710;113.631432,23.613142;113.631287,23.612659;113.630905,23.611076;113.630844,23.610802;113.630844,23.610798;113.630768,23.610516;113.630661,23.610060;113.630569,23.609705;113.630554,23.609617;113.630501,23.609388;113.630119,23.607822;113.629776,23.606388;113.629395,23.604740;113.628891,23.602587;113.628479,23.600821;113.628136,23.599293;113.627968,23.598680;113.627953,23.598633;113.627884,23.598433;113.627785,23.598202;113.627632,23.597919;113.627487,23.597683;113.627281,23.597401;113.627037,23.597139;113.626106,23.596230;113.625641,23.595755;113.624992,23.595139;113.624092,23.594326;113.623161,23.593433;113.622879,23.593147;113.622734,23.592981;113.622383,23.592590;113.622055,23.592186;113.621872,23.591957;113.621574,23.591545;113.621292,23.591133;113.621117,23.590864;113.620880,23.590433;113.620735,23.590164;113.620674,23.590054;113.620673,23.590052;113.620603,23.589913;113.619475,23.587643;113.619401,23.587491;113.619401,23.587487;113.619175,23.587040;113.618984,23.586658;113.618893,23.586471;113.618598,23.585868;113.618108,23.584874;113.617930,23.584440;113.617769,23.583928;113.617708,23.583646;113.617630,23.583073;113.617582,23.582478;113.617578,23.582357;113.617578,23.582361;113.617584,23.582365;113.617584,23.582359;113.617554,23.581884;113.617485,23.580811;113.617477,23.580591;113.617485,23.580204;113.617493,23.579849;113.617554,23.579384;113.617668,23.578743;113.617760,23.578316;113.617790,23.578138;113.618042,23.576904;113.618080,23.576723;113.618095,23.576658;113.618118,23.576557;113.618187,23.576189;113.618347,23.575378;113.618416,23.574808;113.618423,23.574497;113.618408,23.574158;113.618286,23.573481;113.618263,23.573381;113.618210,23.573103;113.618210,23.573111;113.618210,23.573120;113.618210,23.573116;113.618172,23.572929;113.618080,23.572432;113.618034,23.572153;113.618011,23.571901;113.617989,23.571444;113.618034,23.570911;113.618187,23.569813;113.618332,23.568825;113.618462,23.567951;113.618652,23.566698;113.618759,23.565947;113.618790,23.565674;113.618828,23.565474;113.618843,23.565365;113.618874,23.565182;113.618896,23.565014;113.618896,23.564964;113.619118,23.563465;113.619171,23.563156;113.619263,23.562523;113.619286,23.562109;113.619263,23.561775;113.619232,23.561602;113.619171,23.561384;113.619011,23.561010;113.618790,23.560673;113.618652,23.560495;113.618149,23.559973;113.617950,23.559765;113.616966,23.558811;113.615730,23.557600;113.615547,23.557409;113.615356,23.557222;113.615105,23.556976;113.614723,23.556602;113.614052,23.555933;113.613762,23.555609;113.613365,23.555122;113.613190,23.554810;113.613129,23.554688;113.613052,23.554518;113.612823,23.554016;113.612648,23.553556;113.612625,23.553484;113.612602,23.553438;113.612549,23.553284;113.612526,23.553211;113.612526,23.553207;113.612282,23.552565;113.612068,23.551991;113.611961,23.551771;113.611816,23.551476;113.611557,23.551102;113.611328,23.550846;113.611069,23.550591;113.610443,23.550087;113.610435,23.550077;113.609962,23.549686;113.609459,23.549290;113.609207,23.549063;113.609055,23.548923;113.608841,23.548676;113.608757,23.548571;113.608536,23.548216;113.608398,23.547951;113.608315,23.547665;113.608276,23.547514;113.608231,23.547321;113.608185,23.547031;113.608154,23.546612;113.608155,23.546610;113.608121,23.546150;113.608082,23.545586;113.608077,23.545451;113.608090,23.545013;113.608142,23.544488;113.608160,23.544405;113.608290,23.543698;113.608312,23.543607;113.608398,23.543199;113.608637,23.542118;113.608750,23.541584;113.608954,23.540612;113.608971,23.540530;113.609123,23.539800;113.609323,23.538889;113.609366,23.538637;113.609414,23.538329;113.609449,23.537956;113.609466,23.537617;113.609466,23.537287;113.609444,23.536819;113.609414,23.536536;113.609332,23.536102;113.609214,23.535690;113.609214,23.535686;113.609106,23.535321;113.608980,23.534909;113.608733,23.534227;113.608234,23.532986;113.608121,23.532713;113.608008,23.532444;113.607795,23.531910;113.607682,23.531623;113.607244,23.530547;113.607122,23.530247;113.607118,23.530243;113.606984,23.529922;113.606858,23.529683;113.606645,23.529340;113.606484,23.529141;113.606380,23.529028;113.606124,23.528776;113.605894,23.528576;113.604944,23.527782;113.604388,23.527326;113.603707,23.526758;113.603559,23.526628;113.603216,23.526306;113.603142,23.526228;113.602765,23.525773;113.602691,23.525673;113.602374,23.525477;113.602248,23.525430;113.602161,23.525412;113.602031,23.525412;113.601658,23.525499;113.601263,23.525764;113.600777,23.526059;113.599852,23.526680;113.599466,23.526931;113.599149,23.527135;113.599227,23.527253;113.599414,23.527556',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0900',\n",
       "         'end_time': '1800',\n",
       "         'via_num': '19',\n",
       "         'via_stops': [{'name': '卫东',\n",
       "           'id': '900000111141003',\n",
       "           'location': '113.671707,23.643766'},\n",
       "          {'name': '交警温泉中队',\n",
       "           'id': '900000111141029',\n",
       "           'location': '113.656944,23.630304'},\n",
       "          {'name': '冲口',\n",
       "           'id': '900000111141022',\n",
       "           'location': '113.649731,23.624987'},\n",
       "          {'name': '牛步迳',\n",
       "           'id': '900000111141006',\n",
       "           'location': '113.644640,23.621901'},\n",
       "          {'name': '华辉度假村',\n",
       "           'id': '900000111141023',\n",
       "           'location': '113.638325,23.620156'},\n",
       "          {'name': '温泉镇政府',\n",
       "           'id': '900000111141008',\n",
       "           'location': '113.632957,23.615774'},\n",
       "          {'name': '云星村',\n",
       "           'id': '900000111141024',\n",
       "           'location': '113.630844,23.610802'},\n",
       "          {'name': '宣星路口',\n",
       "           'id': '900000111141010',\n",
       "           'location': '113.628891,23.602587'},\n",
       "          {'name': '新华',\n",
       "           'id': '900000111141011',\n",
       "           'location': '113.620674,23.590054'},\n",
       "          {'name': '水底村',\n",
       "           'id': '900000111141012',\n",
       "           'location': '113.619401,23.587491'},\n",
       "          {'name': '南洋学院',\n",
       "           'id': '900000111141028',\n",
       "           'location': '113.617578,23.582357'},\n",
       "          {'name': '江埔社区',\n",
       "           'id': '900000111141014',\n",
       "           'location': '113.618210,23.573103'},\n",
       "          {'name': '沙塱村',\n",
       "           'id': '900000111141015',\n",
       "           'location': '113.615547,23.557409'},\n",
       "          {'name': '凤院北',\n",
       "           'id': '900000111141025',\n",
       "           'location': '113.612526,23.553211'},\n",
       "          {'name': '凤院路口',\n",
       "           'id': '900000111141016',\n",
       "           'location': '113.610443,23.550087'},\n",
       "          {'name': '江埔村二社',\n",
       "           'id': '900000111141026',\n",
       "           'location': '113.608154,23.546612'},\n",
       "          {'name': '江埔村',\n",
       "           'id': '900000111141018',\n",
       "           'location': '113.608954,23.540612'},\n",
       "          {'name': '迎福里',\n",
       "           'id': '900000111141019',\n",
       "           'location': '113.609214,23.535690'},\n",
       "          {'name': '城建学院',\n",
       "           'id': '900000111141020',\n",
       "           'location': '113.607122,23.530247'}]}]},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}},\n",
       "     {'taxi': [],\n",
       "      'walking': {'origin': '113.599403,23.527552',\n",
       "       'destination': '113.599236,23.527334',\n",
       "       'distance': '35',\n",
       "       'duration': '30',\n",
       "       'steps': [{'instruction': '步行32米右转',\n",
       "         'road': [],\n",
       "         'distance': '32',\n",
       "         'duration': [],\n",
       "         'polyline': '113.599403,23.527552;113.599243,23.527306',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行3米到达从化汽车站总站',\n",
       "         'road': [],\n",
       "         'distance': '3',\n",
       "         'duration': [],\n",
       "         'polyline': '113.599243,23.527300;113.599236,23.527334',\n",
       "         'action': [],\n",
       "         'assistant_action': '到达从化汽车站总站'}]},\n",
       "      'bus': {'buslines': [{'departure_stop': {'name': '从化汽车站总站',\n",
       "          'id': '900000050507046',\n",
       "          'location': '113.599201,23.527330'},\n",
       "         'arrival_stop': {'name': '青云城内路口',\n",
       "          'id': '900000050507058',\n",
       "          'location': '113.585373,23.547461'},\n",
       "         'name': '从9路(从化汽车站总站--鳌头客运站总站)',\n",
       "         'id': '900000050507',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '3121',\n",
       "         'duration': '1053',\n",
       "         'polyline': '113.599201,23.527330;113.599252,23.527309;113.599228,23.527254;113.599144,23.527136;113.598633,23.527487;113.598251,23.527752;113.597733,23.528097;113.597473,23.528273;113.597076,23.528534;113.596565,23.528875;113.595993,23.529263;113.595200,23.529787;113.594910,23.529987;113.594589,23.530209;113.594116,23.530516;113.593834,23.530716;113.593300,23.531076;113.593040,23.531242;113.592957,23.531288;113.591309,23.532417;113.590858,23.532713;113.589882,23.533369;113.589493,23.533625;113.589492,23.533624;113.588898,23.534023;113.588819,23.534080;113.588689,23.534167;113.585885,23.536050;113.585838,23.536124;113.585425,23.536432;113.585169,23.536615;113.584484,23.537092;113.583915,23.537491;113.583585,23.537721;113.583676,23.538151;113.583702,23.538281;113.583707,23.538355;113.583737,23.538576;113.583980,23.539878;113.584006,23.540043;113.584006,23.540039;113.584115,23.540677;113.584258,23.541415;113.584266,23.541489;113.584518,23.542830;113.584657,23.543607;113.584679,23.543698;113.584701,23.543802;113.584731,23.543963;113.584766,23.544162;113.584809,23.544397;113.584805,23.544397;113.585030,23.545621;113.585221,23.546645;113.585373,23.547461',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0555',\n",
       "         'end_time': '2030',\n",
       "         'via_num': '5',\n",
       "         'via_stops': [{'name': '姓钟围',\n",
       "           'id': '900000050507031',\n",
       "           'location': '113.595993,23.529263'},\n",
       "          {'name': '地铁从化客运站2',\n",
       "           'id': '900000050507056',\n",
       "           'location': '113.593040,23.531242'},\n",
       "          {'name': '流溪河大桥',\n",
       "           'id': '900000050507002',\n",
       "           'location': '113.589493,23.533625'},\n",
       "          {'name': '从化交通运输局',\n",
       "           'id': '900000050507057',\n",
       "           'location': '113.584006,23.540043'},\n",
       "          {'name': '青云公园',\n",
       "           'id': '900000050507048',\n",
       "           'location': '113.584809,23.544397'}]}]},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}},\n",
       "     {'taxi': [],\n",
       "      'walking': {'origin': '113.585381,23.547483',\n",
       "       'destination': '113.586487,23.548855',\n",
       "       'distance': '231',\n",
       "       'duration': '198',\n",
       "       'steps': [{'instruction': '沿青云路步行11米向右前方行走',\n",
       "         'road': '青云路',\n",
       "         'distance': '11',\n",
       "         'duration': [],\n",
       "         'polyline': '113.585381,23.547483;113.585396,23.547586',\n",
       "         'action': '向右前方行走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行97米右转',\n",
       "         'road': [],\n",
       "         'distance': '97',\n",
       "         'duration': [],\n",
       "         'polyline': '113.585396,23.547586;113.585442,23.547583;113.585503,23.547668;113.585571,23.547739;113.585716,23.547834;113.586014,23.547930;113.586121,23.547939;113.586121,23.548021',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿新城东路步行34米左转',\n",
       "         'road': '新城东路',\n",
       "         'distance': '34',\n",
       "         'duration': [],\n",
       "         'polyline': '113.586121,23.548021;113.586189,23.548021;113.586464,23.548038',\n",
       "         'action': '左转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行89米',\n",
       "         'road': [],\n",
       "         'distance': '89',\n",
       "         'duration': [],\n",
       "         'polyline': '113.586464,23.548038;113.586464,23.548120;113.586464,23.548286;113.586479,23.548624;113.586487,23.548855',\n",
       "         'action': [],\n",
       "         'assistant_action': []}]},\n",
       "      'bus': {'buslines': []},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}}]},\n",
       "   {'cost': '2.0',\n",
       "    'duration': '6192',\n",
       "    'nightflag': '0',\n",
       "    'walking_distance': '2275',\n",
       "    'distance': '21715',\n",
       "    'missed': '1',\n",
       "    'segments': [{'taxi': [],\n",
       "      'walking': {'origin': '113.679588,23.632492',\n",
       "       'destination': '113.675644,23.619991',\n",
       "       'distance': '1957',\n",
       "       'duration': '1677',\n",
       "       'steps': [{'instruction': '步行101米右转',\n",
       "         'road': [],\n",
       "         'distance': '101',\n",
       "         'duration': [],\n",
       "         'polyline': '113.679588,23.632492;113.680588,23.632523',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行199米向右前方行走',\n",
       "         'road': [],\n",
       "         'distance': '199',\n",
       "         'duration': [],\n",
       "         'polyline': '113.680588,23.632523;113.680641,23.632139;113.680672,23.631741;113.680634,23.631540;113.680588,23.631437;113.680496,23.631241;113.680405,23.631094;113.680206,23.630842',\n",
       "         'action': '向右前方行走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行159米左转',\n",
       "         'road': [],\n",
       "         'distance': '159',\n",
       "         'duration': [],\n",
       "         'polyline': '113.680206,23.630838;113.680038,23.630772;113.679642,23.630638;113.679359,23.630522;113.679199,23.630472;113.679031,23.630430;113.678879,23.630404;113.678711,23.630365',\n",
       "         'action': '左转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行237米左转',\n",
       "         'road': [],\n",
       "         'distance': '237',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678711,23.630360;113.678711,23.629341;113.678711,23.629192;113.678688,23.629084;113.678635,23.629023;113.678421,23.628902;113.678368,23.628841;113.678314,23.628723;113.678291,23.628611;113.678276,23.628372',\n",
       "         'action': '左转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行498米向右前方行走',\n",
       "         'road': [],\n",
       "         'distance': '498',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678276,23.628368;113.678574,23.628338;113.678688,23.628307;113.678848,23.628233;113.679047,23.628073;113.679161,23.627964;113.679214,23.627869;113.679237,23.627777;113.679283,23.627525;113.679291,23.627321;113.679253,23.626854;113.679184,23.626623;113.679138,23.626497;113.679001,23.626259;113.678940,23.626177;113.678711,23.625977;113.678619,23.625864;113.678528,23.625721;113.678436,23.625191;113.678429,23.625057;113.678452,23.624939;113.678574,23.624657',\n",
       "         'action': '向右前方行走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行722米左转',\n",
       "         'road': [],\n",
       "         'distance': '722',\n",
       "         'duration': [],\n",
       "         'polyline': '113.678574,23.624653;113.678558,23.624510;113.678413,23.624323;113.677582,23.623793;113.676529,23.623346;113.676361,23.623255;113.676270,23.623152;113.676109,23.622833;113.676041,23.622738;113.675789,23.622482;113.675499,23.622278;113.675415,23.622175;113.675385,23.622087;113.675377,23.621836;113.675392,23.621611;113.675430,23.621475;113.675545,23.621359;113.675766,23.621181;113.675850,23.621090;113.675903,23.620995;113.675903,23.620855;113.675880,23.620726;113.675743,23.620546;113.675598,23.620373;113.675240,23.620012',\n",
       "         'action': '左转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行41米到达松浪社',\n",
       "         'road': [],\n",
       "         'distance': '41',\n",
       "         'duration': [],\n",
       "         'polyline': '113.675240,23.620008;113.675491,23.620012;113.675644,23.619991;113.675644,23.619991',\n",
       "         'action': [],\n",
       "         'assistant_action': '到达松浪社'}]},\n",
       "      'bus': {'buslines': [{'departure_stop': {'name': '松浪社',\n",
       "          'id': '900000111143034',\n",
       "          'location': '113.675629,23.619987'},\n",
       "         'arrival_stop': {'name': '新世纪广场',\n",
       "          'id': '900000111143016',\n",
       "          'location': '113.588885,23.548320'},\n",
       "         'name': '从20路(乌土村委总站--从化汽车站总站)',\n",
       "         'id': '900000111143',\n",
       "         'type': '普通公交线路',\n",
       "         'distance': '19440',\n",
       "         'duration': '4242',\n",
       "         'polyline': '113.675629,23.619987;113.675301,23.620045;113.675201,23.619968;113.674934,23.619713;113.673920,23.618620;113.673691,23.618429;113.673454,23.618334;113.673218,23.618269;113.671082,23.617786;113.667892,23.617096;113.666336,23.616735;113.665916,23.616650;113.664551,23.616346;113.663689,23.616152;113.663544,23.616119;113.663223,23.616043;113.662567,23.615911;113.662025,23.615803;113.661682,23.615711;113.660400,23.615417;113.660004,23.615669;113.659927,23.615711;113.659088,23.616234;113.657166,23.617487;113.656975,23.617626;113.656815,23.617783;113.655830,23.618845;113.655678,23.618971;113.655548,23.619076;113.655411,23.619141;113.655281,23.619188;113.655083,23.619236;113.654747,23.619293;113.654518,23.619307;113.654320,23.619303;113.653976,23.619244;113.652885,23.619011;113.652718,23.618984;113.652573,23.618984;113.652428,23.619015;113.651825,23.619240;113.650818,23.619617;113.649361,23.619949;113.648819,23.620077;113.648354,23.620222;113.648087,23.620314;113.647858,23.620438;113.647621,23.620604;113.647377,23.620783;113.647179,23.620893;113.646973,23.620993;113.646477,23.621176;113.646317,23.621258;113.645866,23.621567;113.645721,23.621698;113.645721,23.621876;113.645821,23.622089;113.646248,23.622282;113.646629,23.622496;113.647217,23.622856;113.647697,23.623178;113.648071,23.623466;113.649094,23.624311;113.649666,23.624836;113.649811,23.624950;113.650055,23.625156;113.650192,23.625296;113.652588,23.627287;113.652748,23.627409;113.653603,23.628078;113.654411,23.628637;113.655273,23.629168;113.657509,23.630495;113.657425,23.630590;113.657120,23.630409;113.654335,23.628742;113.653847,23.628416;113.653603,23.628225;113.652382,23.627178;113.650169,23.625324;113.650017,23.625223;113.649773,23.625013;113.649742,23.624990;113.649734,23.624990;113.648926,23.624327;113.647842,23.623442;113.647362,23.623091;113.646782,23.622723;113.646347,23.622465;113.645981,23.622286;113.645592,23.622131;113.645119,23.621990;113.644714,23.621914;113.644516,23.621885;113.644521,23.621890;113.644371,23.621862;113.643257,23.621748;113.642578,23.621666;113.642471,23.621645;113.642029,23.621540;113.641449,23.621353;113.640526,23.621033;113.639336,23.620604;113.639183,23.620543;113.638855,23.620413;113.638474,23.620235;113.636047,23.618944;113.635544,23.618668;113.635254,23.618481;113.634750,23.618097;113.634514,23.617891;113.634254,23.617622;113.633980,23.617271;113.633636,23.616779;113.633057,23.615911;113.632881,23.615646;113.632401,23.614927;113.631912,23.614172;113.631660,23.613710;113.631432,23.613142;113.631287,23.612659;113.630905,23.611076;113.630844,23.610802;113.630844,23.610798;113.630768,23.610516;113.630577,23.610237;113.630516,23.610188;113.630455,23.610161;113.630257,23.610147;113.630119,23.610188;113.629410,23.610382;113.626266,23.611412;113.624924,23.611845;113.624825,23.611914;113.623993,23.612200;113.622940,23.612551;113.620605,23.613319;113.620193,23.613451;113.618462,23.614006;113.617325,23.614307;113.616829,23.614441;113.616310,23.614557;113.615623,23.614731;113.615547,23.614721;113.615829,23.613806;113.615883,23.613615;113.615837,23.613312;113.615700,23.612883;113.615692,23.612778;113.615692,23.612595;113.615700,23.612335;113.615623,23.611740;113.615601,23.611603;113.615532,23.611467;113.615410,23.611258;113.615379,23.611164;113.615349,23.610947;113.615349,23.610842;113.615372,23.610706;113.615479,23.610287;113.615486,23.610147;113.615486,23.610014;113.615395,23.609644;113.615395,23.609617;113.615395,23.609457;113.615402,23.609367;113.615456,23.609184;113.615509,23.609085;113.616081,23.608265;113.616371,23.607573;113.616409,23.607368;113.616402,23.607235;113.616371,23.607100;113.616272,23.606810;113.616158,23.606575;113.615829,23.605993;113.615562,23.605604;113.614883,23.604675;113.614601,23.604301;113.614601,23.604298;113.614388,23.604015;113.614090,23.603594;113.613861,23.603292;113.613716,23.603111;113.612968,23.602079;113.612846,23.601910;113.612610,23.601501;113.612335,23.600824;113.612335,23.600820;113.611424,23.598633;113.611029,23.597665;113.610942,23.597483;113.610833,23.597318;113.610738,23.597183;113.610239,23.596602;113.610109,23.596432;113.609592,23.595547;113.608924,23.594384;113.608841,23.594180;113.608741,23.593841;113.608663,23.593490;113.608665,23.593493;113.608665,23.593498;113.608665,23.593493;113.608139,23.591215;113.608124,23.591070;113.608032,23.590477;113.608025,23.590450;113.608025,23.590446;113.607971,23.590200;113.607903,23.589956;113.607841,23.589813;113.607712,23.589596;113.607452,23.589245;113.607239,23.588840;113.606712,23.587645;113.606400,23.586927;113.606293,23.586622;113.605988,23.585661;113.605904,23.585447;113.605820,23.585260;113.605629,23.584936;113.605354,23.584476;113.605232,23.584290;113.604759,23.583406;113.604652,23.583202;113.604584,23.582983;113.604477,23.582586;113.604095,23.580610;113.603882,23.579472;113.603661,23.578447;113.603638,23.578199;113.603630,23.577904;113.603706,23.576944;113.603737,23.576658;113.603760,23.576448;113.603867,23.576088;113.604012,23.575682;113.604042,23.575418;113.604034,23.575291;113.604012,23.575186;113.603966,23.575087;113.603897,23.574961;113.603821,23.574879;113.603645,23.574709;113.603127,23.574280;113.603125,23.574275;113.602196,23.573498;113.601892,23.573229;113.600990,23.572261;113.600872,23.572127;113.600694,23.571936;113.600625,23.571853;113.600503,23.571680;113.600434,23.571528;113.600395,23.571402;113.600378,23.571254;113.600378,23.571094;113.600443,23.570551;113.600477,23.570321;113.600521,23.570217;113.600569,23.570148;113.600816,23.569948;113.600942,23.569770;113.600894,23.568885;113.600799,23.567886;113.600799,23.567882;113.600738,23.567266;113.600694,23.566693;113.600681,23.566081;113.600703,23.565673;113.600707,23.565582;113.600773,23.564679;113.600703,23.564306;113.600651,23.564106;113.600660,23.563581;113.600751,23.562474;113.600773,23.561827;113.600799,23.561567;113.600851,23.561354;113.600916,23.561089;113.600981,23.559727;113.600981,23.558984;113.600977,23.557986;113.600977,23.556823;113.600977,23.556693;113.600959,23.555773;113.600938,23.554688;113.600924,23.554180;113.600781,23.553906;113.600760,23.552578;113.600742,23.552209;113.600734,23.551992;113.600694,23.551393;113.600621,23.551393;113.599210,23.551398;113.599149,23.551398;113.598633,23.551393;113.598372,23.551385;113.597773,23.551398;113.596658,23.551393;113.596597,23.551385;113.596202,23.551376;113.596011,23.551354;113.595807,23.551302;113.595564,23.551189;113.595321,23.551055;113.595269,23.551020;113.595004,23.550864;113.594705,23.550690;113.594440,23.550525;113.593989,23.550256;113.593733,23.550113;113.593503,23.549965;113.593437,23.549922;113.593216,23.549757;113.592995,23.549466;113.592908,23.549110;113.592847,23.548624;113.592826,23.548268;113.592817,23.548160;113.592819,23.548161;113.592781,23.547560;113.592644,23.547079;113.592552,23.546762;113.592552,23.546766;113.592552,23.546762;113.592522,23.546671;113.592415,23.546415;113.592346,23.546280;113.591393,23.547153;113.591110,23.547373;113.590714,23.547590;113.590712,23.547591;113.590595,23.547652;113.590430,23.547747;113.590095,23.547930;113.589549,23.548238;113.589193,23.548307;113.588885,23.548320',\n",
       "         'bustimetag': '2',\n",
       "         'start_time': '0830',\n",
       "         'end_time': '1900',\n",
       "         'via_num': '19',\n",
       "         'via_stops': [{'name': '源湖村五社',\n",
       "           'id': '900000111143035',\n",
       "           'location': '113.663689,23.616152'},\n",
       "          {'name': '源湖村',\n",
       "           'id': '900000111143036',\n",
       "           'location': '113.659927,23.615711'},\n",
       "          {'name': '温泉交警中队',\n",
       "           'id': '900000111143003',\n",
       "           'location': '113.657120,23.630409'},\n",
       "          {'name': '冲口',\n",
       "           'id': '900000111143031',\n",
       "           'location': '113.649742,23.624990'},\n",
       "          {'name': '牛步迳',\n",
       "           'id': '900000111143004',\n",
       "           'location': '113.644516,23.621885'},\n",
       "          {'name': '温泉镇政府',\n",
       "           'id': '900000111143005',\n",
       "           'location': '113.632881,23.615646'},\n",
       "          {'name': '云星村站',\n",
       "           'id': '900000111143032',\n",
       "           'location': '113.630844,23.610802'},\n",
       "          {'name': '麻三村委',\n",
       "           'id': '900000111143006',\n",
       "           'location': '113.615532,23.611467'},\n",
       "          {'name': '麻二村委',\n",
       "           'id': '900000111143007',\n",
       "           'location': '113.614601,23.604301'},\n",
       "          {'name': '麻一木棉站',\n",
       "           'id': '900000111143037',\n",
       "           'location': '113.612335,23.600824'},\n",
       "          {'name': '沙洲',\n",
       "           'id': '900000111143027',\n",
       "           'location': '113.608663,23.593490'},\n",
       "          {'name': '塘下村十社',\n",
       "           'id': '900000111143028',\n",
       "           'location': '113.608025,23.590450'},\n",
       "          {'name': '塘下村委',\n",
       "           'id': '900000111143008',\n",
       "           'location': '113.605354,23.584476'},\n",
       "          {'name': '东风村委',\n",
       "           'id': '900000111143029',\n",
       "           'location': '113.603127,23.574280'},\n",
       "          {'name': '地铁东风站',\n",
       "           'id': '900000111143009',\n",
       "           'location': '113.600799,23.567886'},\n",
       "          {'name': '从化政务服务中心',\n",
       "           'id': '900000111143012',\n",
       "           'location': '113.594440,23.550525'},\n",
       "          {'name': '从化博物馆',\n",
       "           'id': '900000111143013',\n",
       "           'location': '113.592817,23.548160'},\n",
       "          {'name': '河堤广场',\n",
       "           'id': '900000111143014',\n",
       "           'location': '113.592552,23.546762'},\n",
       "          {'name': '河滨公园',\n",
       "           'id': '900000111143015',\n",
       "           'location': '113.590714,23.547590'}]}]},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}},\n",
       "     {'taxi': [],\n",
       "      'walking': {'origin': '113.588799,23.548315',\n",
       "       'destination': '113.586487,23.548855',\n",
       "       'distance': '318',\n",
       "       'duration': '272',\n",
       "       'steps': [{'instruction': '沿东成路步行126米往前走',\n",
       "         'road': '东成路',\n",
       "         'distance': '126',\n",
       "         'duration': [],\n",
       "         'polyline': '113.588799,23.548315;113.588615,23.548298;113.588364,23.548260;113.587570,23.548120',\n",
       "         'action': '往前走',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '沿新城东路步行112米右转',\n",
       "         'road': '新城东路',\n",
       "         'distance': '112',\n",
       "         'duration': [],\n",
       "         'polyline': '113.587570,23.548117;113.587471,23.548107;113.586464,23.548120',\n",
       "         'action': '右转',\n",
       "         'assistant_action': []},\n",
       "        {'instruction': '步行80米',\n",
       "         'road': [],\n",
       "         'distance': '80',\n",
       "         'duration': [],\n",
       "         'polyline': '113.586464,23.548120;113.586464,23.548286;113.586479,23.548624;113.586487,23.548855',\n",
       "         'action': [],\n",
       "         'assistant_action': []}]},\n",
       "      'bus': {'buslines': []},\n",
       "      'entrance': [],\n",
       "      'exit': [],\n",
       "      'railway': {'via_stops': [], 'alters': [], 'spaces': []}}]}]}}"
      ]
     },
     "execution_count": 258,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### 驾车\n",
    "#### 准备工作\n",
    "url:https://restapi.amap.com/v3/direction/driving?parameters  \n",
    "1.key/origin/destination"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 259,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.679287,23.632575'"
      ]
     },
     "execution_count": 259,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数据准备起点\n",
    "xiaoliu_map = \"d8383619b68b944efbd5dfdab977b2ae\"\n",
    "origin = geocode(xiaoliu_map, \"广东省广州市中山大学南方学院\")\n",
    "origin"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 260,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'113.586605,23.548852'"
      ]
     },
     "execution_count": 260,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 数据准备终点\n",
    "destination = geocode(xiaoliu_map,\"广东省广州市从化区东风地铁站\")\n",
    "destination"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 261,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 驾车路径规划\n",
    "car_url = 'https://restapi.amap.com/v3/direction/driving?parameters'\n",
    "#参数\n",
    "params = {\n",
    "        'key':xiaoliu_map,\n",
    "        'origin':\"113.679287,23.632575\",\n",
    "        'destination':\"113.586605,23.548852\",\n",
    "        'city':'广州'\n",
    "    }\n",
    "\n",
    "r = requests.get(car_url, params=params)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 262,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 262,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 263,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'route': {'origin': '113.679287,23.632575',\n",
       "  'destination': '113.586605,23.548852',\n",
       "  'taxi_cost': '48',\n",
       "  'paths': [{'distance': '17215',\n",
       "    'duration': '1975',\n",
       "    'strategy': '速度最快',\n",
       "    'tolls': '0',\n",
       "    'toll_distance': '0',\n",
       "    'steps': [{'instruction': '向南行驶9米左转',\n",
       "      'orientation': '南',\n",
       "      'distance': '9',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '6',\n",
       "      'polyline': '113.679596,23.632574;113.679596,23.632491',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '9',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679596,23.632574;113.679596,23.632491'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向东行驶100米右转',\n",
       "      'orientation': '东',\n",
       "      'distance': '100',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '29',\n",
       "      'polyline': '113.679596,23.632491;113.680582,23.632522',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '100',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679596,23.632491;113.680582,23.632522'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向南行驶199米向右前方行驶',\n",
       "      'orientation': '南',\n",
       "      'distance': '199',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '49',\n",
       "      'polyline': '113.680582,23.632522;113.680642,23.632135;113.680668,23.631736;113.680642,23.631589;113.680629,23.631536;113.68059,23.631432;113.680499,23.631237;113.680399,23.631089;113.680204,23.630838',\n",
       "      'action': '向右前方行驶',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '122',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.680582,23.632522;113.680642,23.632135;113.680668,23.631736;113.680642,23.631589;113.680629,23.631536;113.68059,23.631432'},\n",
       "       {'lcode': [],\n",
       "        'distance': '77',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.68059,23.631432;113.680499,23.631237;113.680399,23.631089;113.680204,23.630838'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向西行驶159米左转',\n",
       "      'orientation': '西',\n",
       "      'distance': '159',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '31',\n",
       "      'polyline': '113.680204,23.630838;113.68003,23.630768;113.67964,23.630634;113.679358,23.630516;113.679197,23.630469;113.678711,23.63036',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '18',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.680204,23.630838;113.68003,23.630768'},\n",
       "       {'lcode': [],\n",
       "        'distance': '42',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.68003,23.630768;113.67964,23.630634'},\n",
       "       {'lcode': [],\n",
       "        'distance': '48',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.67964,23.630634;113.679358,23.630516;113.679197,23.630469'},\n",
       "       {'lcode': [],\n",
       "        'distance': '51',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679197,23.630469;113.678711,23.63036'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向南行驶237米左转',\n",
       "      'orientation': '南',\n",
       "      'distance': '237',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '63',\n",
       "      'polyline': '113.678711,23.63036;113.678711,23.629336;113.678698,23.629128;113.678663,23.629054;113.678572,23.628984;113.67842,23.628898;113.678364,23.628837;113.678325,23.628772;113.678299,23.628646;113.678273,23.628372',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '113',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678711,23.63036;113.678711,23.629336'},\n",
       "       {'lcode': [],\n",
       "        'distance': '124',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678711,23.629336;113.678698,23.629128;113.678663,23.629054;113.678572,23.628984;113.67842,23.628898;113.678364,23.628837;113.678325,23.628772;113.678299,23.628646;113.678273,23.628372'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向东南行驶105米向右前方行驶',\n",
       "      'orientation': '东南',\n",
       "      'distance': '105',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '50',\n",
       "      'polyline': '113.678273,23.628372;113.678572,23.628333;113.678689,23.628303;113.678845,23.628234;113.679045,23.628069;113.679162,23.62796',\n",
       "      'action': '向右前方行驶',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '43',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678273,23.628372;113.678572,23.628333;113.678689,23.628303'},\n",
       "       {'lcode': [],\n",
       "        'distance': '62',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678689,23.628303;113.678845,23.628234;113.679045,23.628069;113.679162,23.62796'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向南行驶393米向右前方行驶',\n",
       "      'orientation': '南',\n",
       "      'distance': '393',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '63',\n",
       "      'polyline': '113.679162,23.62796;113.679214,23.627865;113.679236,23.627773;113.67928,23.627522;113.679288,23.627318;113.679249,23.626849;113.679184,23.626619;113.679136,23.626493;113.679002,23.62625;113.678937,23.626172;113.678707,23.625972;113.678615,23.625859;113.678529,23.625716;113.678507,23.625634;113.678433,23.625187;113.678424,23.625052;113.678455,23.624931;113.678572,23.624653',\n",
       "      'action': '向右前方行驶',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '72',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679162,23.62796;113.679214,23.627865;113.679236,23.627773;113.67928,23.627522;113.679288,23.627318'},\n",
       "       {'lcode': [],\n",
       "        'distance': '321',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.679288,23.627318;113.679249,23.626849;113.679184,23.626619;113.679136,23.626493;113.679002,23.62625;113.678937,23.626172;113.678707,23.625972;113.678615,23.625859;113.678529,23.625716;113.678507,23.625634;113.678433,23.625187;113.678424,23.625052;113.678455,23.624931;113.678572,23.624653'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿源富街途径源湖街向西南行驶2.4千米左转',\n",
       "      'orientation': '西南',\n",
       "      'road': '源富街',\n",
       "      'distance': '2351',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '254',\n",
       "      'polyline': '113.678572,23.624653;113.678555,23.624505;113.678411,23.624323;113.677578,23.623789;113.676528,23.623346;113.676354,23.623247;113.676263,23.623147;113.676102,23.62283;113.676037,23.622734;113.675786,23.622474;113.675499,23.62227;113.675412,23.62217;113.675378,23.622083;113.675373,23.621832;113.675391,23.621606;113.675438,23.621471;113.675538,23.621354;113.675764,23.621176;113.675851,23.621085;113.675898,23.62099;113.675911,23.620851;113.675868,23.62072;113.675786,23.620603;113.675742,23.620543;113.675595,23.620369;113.675239,23.620009;113.674931,23.619714;113.673919,23.61862;113.673689,23.618429;113.673459,23.618333;113.673216,23.618268;113.671081,23.617786;113.667895,23.617096;113.666341,23.616736;113.665916,23.616649;113.664549,23.616345;113.663585,23.616128;113.663507,23.616107;113.663225,23.616042;113.662569,23.615911;113.662027,23.615803;113.661684,23.615712;113.660404,23.615417',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '42',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678572,23.624653;113.678555,23.624505;113.678411,23.624323'},\n",
       "       {'lcode': [],\n",
       "        'distance': '435',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.678411,23.624323;113.677578,23.623789;113.676528,23.623346;113.676354,23.623247;113.676263,23.623147;113.676102,23.62283;113.676037,23.622734;113.675786,23.622474;113.675499,23.62227;113.675412,23.62217;113.675378,23.622083;113.675373,23.621832'},\n",
       "       {'lcode': [],\n",
       "        'distance': '245',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.675373,23.621832;113.675391,23.621606;113.675438,23.621471;113.675538,23.621354;113.675764,23.621176;113.675851,23.621085;113.675898,23.62099;113.675911,23.620851;113.675868,23.62072;113.675786,23.620603;113.675742,23.620543;113.675595,23.620369;113.675239,23.620009'},\n",
       "       {'lcode': [],\n",
       "        'distance': '512',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.675239,23.620009;113.674931,23.619714;113.673919,23.61862;113.673689,23.618429;113.673459,23.618333;113.673216,23.618268;113.671081,23.617786'},\n",
       "       {'lcode': [],\n",
       "        'distance': '334',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.671081,23.617786;113.667895,23.617096'},\n",
       "       {'lcode': [],\n",
       "        'distance': '163',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.667895,23.617096;113.666341,23.616736'},\n",
       "       {'lcode': [],\n",
       "        'distance': '44',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.666341,23.616736;113.665916,23.616649'},\n",
       "       {'lcode': [],\n",
       "        'distance': '244',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.665916,23.616649;113.664549,23.616345;113.663585,23.616128'},\n",
       "       {'lcode': [],\n",
       "        'distance': '8',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.663585,23.616128;113.663507,23.616107'},\n",
       "       {'lcode': [],\n",
       "        'distance': '29',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.663507,23.616107;113.663225,23.616042'},\n",
       "       {'lcode': [],\n",
       "        'distance': '68',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.663225,23.616042;113.662569,23.615911'},\n",
       "       {'lcode': [],\n",
       "        'distance': '93',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.662569,23.615911;113.662027,23.615803;113.661684,23.615712'},\n",
       "       {'lcode': [],\n",
       "        'distance': '134',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.661684,23.615712;113.660404,23.615417'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿龙泉路向东南行驶1.9千米右转',\n",
       "      'orientation': '东南',\n",
       "      'road': '龙泉路',\n",
       "      'distance': '1858',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '172',\n",
       "      'polyline': '113.660404,23.615417;113.660872,23.61513;113.661315,23.614831;113.661619,23.614596;113.661667,23.614527;113.661736,23.614349;113.661797,23.614145;113.661862,23.614006;113.661914,23.613937;113.662079,23.613789;113.662613,23.613381;113.662756,23.61322;113.662804,23.613142;113.66434,23.609618;113.664549,23.609128;113.665095,23.607891;113.665694,23.606523;113.667018,23.602865;113.667179,23.602465;113.667361,23.601984;113.667465,23.601688;113.667565,23.601437;113.667665,23.601159;113.667773,23.600877;113.667943,23.600412',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '113',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.660404,23.615417;113.660872,23.61513;113.661315,23.614831'},\n",
       "       {'lcode': [],\n",
       "        'distance': '70',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.661315,23.614831;113.661619,23.614596;113.661667,23.614527;113.661736,23.614349'},\n",
       "       {'lcode': [],\n",
       "        'distance': '23',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.661736,23.614349;113.661797,23.614145'},\n",
       "       {'lcode': [],\n",
       "        'distance': '153',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.661797,23.614145;113.661862,23.614006;113.661914,23.613937;113.662079,23.613789;113.662613,23.613381;113.662756,23.61322;113.662804,23.613142'},\n",
       "       {'lcode': [],\n",
       "        'distance': '626',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.662804,23.613142;113.66434,23.609618;113.664549,23.609128;113.665095,23.607891'},\n",
       "       {'lcode': [],\n",
       "        'distance': '163',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.665095,23.607891;113.665694,23.606523'},\n",
       "       {'lcode': [],\n",
       "        'distance': '426',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.665694,23.606523;113.667018,23.602865'},\n",
       "       {'lcode': [],\n",
       "        'distance': '47',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.667018,23.602865;113.667179,23.602465'},\n",
       "       {'lcode': [],\n",
       "        'distance': '56',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.667179,23.602465;113.667361,23.601984'},\n",
       "       {'lcode': [],\n",
       "        'distance': '34',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.667361,23.601984;113.667465,23.601688'},\n",
       "       {'lcode': [],\n",
       "        'distance': '29',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.667465,23.601688;113.667565,23.601437'},\n",
       "       {'lcode': [],\n",
       "        'distance': '32',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.667565,23.601437;113.667665,23.601159'},\n",
       "       {'lcode': [],\n",
       "        'distance': '32',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.667665,23.601159;113.667773,23.600877'},\n",
       "       {'lcode': [],\n",
       "        'distance': '54',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.667773,23.600877;113.667943,23.600412'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿桃园西路向西南行驶816米靠左',\n",
       "      'orientation': '西南',\n",
       "      'road': '桃园西路',\n",
       "      'distance': '816',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '76',\n",
       "      'polyline': '113.667943,23.600412;113.667322,23.600135;113.666224,23.59964;113.665951,23.599501;113.665777,23.599362;113.665512,23.599089;113.665282,23.598819;113.665252,23.59878;113.665122,23.598633;113.664792,23.598234;113.664549,23.597865;113.664392,23.597617;113.664067,23.597135;113.663737,23.596775;113.663477,23.596506;113.662235,23.59543',\n",
       "      'action': '靠左',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '71',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.667943,23.600412;113.667322,23.600135'},\n",
       "       {'lcode': [],\n",
       "        'distance': '156',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.667322,23.600135;113.666224,23.59964;113.665951,23.599501'},\n",
       "       {'lcode': [],\n",
       "        'distance': '23',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.665951,23.599501;113.665777,23.599362'},\n",
       "       {'lcode': [],\n",
       "        'distance': '40',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.665777,23.599362;113.665512,23.599089'},\n",
       "       {'lcode': [],\n",
       "        'distance': '37',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.665512,23.599089;113.665282,23.598819'},\n",
       "       {'lcode': [],\n",
       "        'distance': '5',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.665282,23.598819;113.665252,23.59878'},\n",
       "       {'lcode': [],\n",
       "        'distance': '77',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.665252,23.59878;113.665122,23.598633;113.664792,23.598234'},\n",
       "       {'lcode': [],\n",
       "        'distance': '79',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.664792,23.598234;113.664549,23.597865;113.664392,23.597617'},\n",
       "       {'lcode': [],\n",
       "        'distance': '115',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.664392,23.597617;113.664067,23.597135;113.663737,23.596775'},\n",
       "       {'lcode': [],\n",
       "        'distance': '39',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.663737,23.596775;113.663477,23.596506'},\n",
       "       {'lcode': [],\n",
       "        'distance': '174',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.663477,23.596506;113.662235,23.59543'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿桃园西路向南行驶2.0千米向右前方行驶',\n",
       "      'orientation': '南',\n",
       "      'road': '桃园西路',\n",
       "      'distance': '1959',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '159',\n",
       "      'polyline': '113.662235,23.59543;113.661554,23.594844;113.661306,23.594601;113.661141,23.59441;113.660903,23.594028;113.660825,23.593885;113.660725,23.593594;113.660543,23.593021;113.660456,23.592799;113.659926,23.591589;113.659826,23.591389;113.659622,23.591046;113.65911,23.590226;113.658819,23.589588;113.65875,23.589397;113.658021,23.587643;113.657813,23.587135;113.657743,23.586931;113.657691,23.586688;113.657548,23.585365;113.657478,23.585156;113.657322,23.584891;113.657114,23.584566;113.657062,23.584449;113.656905,23.583919;113.656879,23.58378;113.656871,23.583676;113.656888,23.583568;113.656979,23.583255;113.657066,23.583025;113.657157,23.582847;113.657378,23.582539;113.657431,23.582439;113.65747,23.582339;113.657483,23.582231;113.657483,23.582105;113.657431,23.580773;113.657396,23.580612;113.657292,23.580304;113.657235,23.580213;113.656723,23.57964;113.656589,23.579484;113.656411,23.579358',\n",
       "      'action': '向右前方行驶',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '95',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.662235,23.59543;113.661554,23.594844'},\n",
       "       {'lcode': [],\n",
       "        'distance': '113',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.661554,23.594844;113.661306,23.594601;113.661141,23.59441;113.660903,23.594028'},\n",
       "       {'lcode': [],\n",
       "        'distance': '143',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.660903,23.594028;113.660825,23.593885;113.660725,23.593594;113.660543,23.593021;113.660456,23.592799'},\n",
       "       {'lcode': [],\n",
       "        'distance': '212',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.660456,23.592799;113.659926,23.591589;113.659826,23.591389;113.659622,23.591046'},\n",
       "       {'lcode': [],\n",
       "        'distance': '182',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.659622,23.591046;113.65911,23.590226;113.658819,23.589588'},\n",
       "       {'lcode': [],\n",
       "        'distance': '21',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.658819,23.589588;113.65875,23.589397'},\n",
       "       {'lcode': [],\n",
       "        'distance': '466',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.65875,23.589397;113.658021,23.587643;113.657813,23.587135;113.657743,23.586931;113.657691,23.586688;113.657548,23.585365'},\n",
       "       {'lcode': [],\n",
       "        'distance': '57',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.657548,23.585365;113.657478,23.585156;113.657322,23.584891'},\n",
       "       {'lcode': [],\n",
       "        'distance': '496',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.657322,23.584891;113.657114,23.584566;113.657062,23.584449;113.656905,23.583919;113.656879,23.58378;113.656871,23.583676;113.656888,23.583568;113.656979,23.583255;113.657066,23.583025;113.657157,23.582847;113.657378,23.582539;113.657431,23.582439;113.65747,23.582339;113.657483,23.582231;113.657483,23.582105;113.657431,23.580773;113.657396,23.580612'},\n",
       "       {'lcode': [],\n",
       "        'distance': '129',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.657396,23.580612;113.657292,23.580304;113.657235,23.580213;113.656723,23.57964'},\n",
       "       {'lcode': [],\n",
       "        'distance': '45',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.656723,23.57964;113.656589,23.579484;113.656411,23.579358'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿石海工业大道向西南行驶1.8千米靠左',\n",
       "      'orientation': '西南',\n",
       "      'road': '石海工业大道',\n",
       "      'distance': '1838',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '134',\n",
       "      'polyline': '113.656411,23.579358;113.65605,23.57931;113.655091,23.579084;113.654913,23.579019;113.654562,23.578845;113.653676,23.578368;113.653429,23.578242;113.652704,23.57786;113.652448,23.5777;113.652001,23.577383;113.651649,23.577105;113.651432,23.576936;113.651076,23.576658;113.650677,23.576332;113.650378,23.576089;113.649674,23.57553;113.649575,23.575447;113.649232,23.575178;113.647405,23.57375;113.647274,23.573637;113.646788,23.573151;113.646606,23.572956;113.646415,23.572773;113.646198,23.572561;113.645959,23.572365;113.645247,23.571862;113.64497,23.571727;113.644878,23.571701;113.644614,23.571671;113.643967,23.571675;113.643503,23.57168;113.643286,23.57168;113.643043,23.571649;113.64293,23.571628;113.642578,23.571506;113.642543,23.571497;113.642322,23.571406;113.64197,23.571224;113.641632,23.570998;113.641428,23.570816',\n",
       "      'action': '靠左',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '36',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.656411,23.579358;113.65605,23.57931'},\n",
       "       {'lcode': [],\n",
       "        'distance': '161',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.65605,23.57931;113.655091,23.579084;113.654913,23.579019;113.654562,23.578845'},\n",
       "       {'lcode': [],\n",
       "        'distance': '104',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.654562,23.578845;113.653676,23.578368'},\n",
       "       {'lcode': [],\n",
       "        'distance': '28',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.653676,23.578368;113.653429,23.578242'},\n",
       "       {'lcode': [],\n",
       "        'distance': '85',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.653429,23.578242;113.652704,23.57786'},\n",
       "       {'lcode': [],\n",
       "        'distance': '89',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.652704,23.57786;113.652448,23.5777;113.652001,23.577383'},\n",
       "       {'lcode': [],\n",
       "        'distance': '47',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.652001,23.577383;113.651649,23.577105'},\n",
       "       {'lcode': [],\n",
       "        'distance': '28',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.651649,23.577105;113.651432,23.576936'},\n",
       "       {'lcode': [],\n",
       "        'distance': '102',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.651432,23.576936;113.651076,23.576658;113.650677,23.576332'},\n",
       "       {'lcode': [],\n",
       "        'distance': '40',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.650677,23.576332;113.650378,23.576089'},\n",
       "       {'lcode': [],\n",
       "        'distance': '94',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.650378,23.576089;113.649674,23.57553'},\n",
       "       {'lcode': [],\n",
       "        'distance': '13',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.649674,23.57553;113.649575,23.575447'},\n",
       "       {'lcode': [],\n",
       "        'distance': '46',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.649575,23.575447;113.649232,23.575178'},\n",
       "       {'lcode': [],\n",
       "        'distance': '244',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.649232,23.575178;113.647405,23.57375'},\n",
       "       {'lcode': [],\n",
       "        'distance': '91',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.647405,23.57375;113.647274,23.573637;113.646788,23.573151'},\n",
       "       {'lcode': [],\n",
       "        'distance': '28',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.646788,23.573151;113.646606,23.572956'},\n",
       "       {'lcode': [],\n",
       "        'distance': '27',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.646606,23.572956;113.646415,23.572773'},\n",
       "       {'lcode': [],\n",
       "        'distance': '156',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.646415,23.572773;113.646198,23.572561;113.645959,23.572365;113.645247,23.571862'},\n",
       "       {'lcode': [],\n",
       "        'distance': '32',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.645247,23.571862;113.64497,23.571727'},\n",
       "       {'lcode': [],\n",
       "        'distance': '103',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.64497,23.571727;113.644878,23.571701;113.644614,23.571671;113.643967,23.571675'},\n",
       "       {'lcode': [],\n",
       "        'distance': '46',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.643967,23.571675;113.643503,23.57168'},\n",
       "       {'lcode': [],\n",
       "        'distance': '210',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.643503,23.57168;113.643286,23.57168;113.643043,23.571649;113.64293,23.571628;113.642578,23.571506;113.642543,23.571497;113.642322,23.571406;113.64197,23.571224;113.641632,23.570998'},\n",
       "       {'lcode': [],\n",
       "        'distance': '28',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.641632,23.570998;113.641428,23.570816'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿政通路向西行驶940米向左前方行驶',\n",
       "      'orientation': '西',\n",
       "      'road': '政通路',\n",
       "      'distance': '940',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '74',\n",
       "      'polyline': '113.641428,23.570816;113.641163,23.570521;113.640955,23.570256;113.640859,23.570152;113.640647,23.569974;113.640399,23.569818;113.638898,23.569002;113.63839,23.568741;113.638047,23.568607;113.637695,23.568524;113.637426,23.568503;113.637205,23.568516;113.636832,23.568581;113.636476,23.568676;113.63533,23.569058;113.633746,23.569614;113.633485,23.569674;113.633247,23.569688',\n",
       "      'action': '向左前方行驶',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '42',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.641428,23.570816;113.641163,23.570521'},\n",
       "       {'lcode': [],\n",
       "        'distance': '51',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.641163,23.570521;113.640955,23.570256;113.640859,23.570152'},\n",
       "       {'lcode': [],\n",
       "        'distance': '238',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.640859,23.570152;113.640647,23.569974;113.640399,23.569818;113.638898,23.569002'},\n",
       "       {'lcode': [],\n",
       "        'distance': '184',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.638898,23.569002;113.63839,23.568741;113.638047,23.568607;113.637695,23.568524;113.637426,23.568503;113.637205,23.568516'},\n",
       "       {'lcode': [],\n",
       "        'distance': '39',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.637205,23.568516;113.636832,23.568581'},\n",
       "       {'lcode': [],\n",
       "        'distance': '37',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.636832,23.568581;113.636476,23.568676'},\n",
       "       {'lcode': [],\n",
       "        'distance': '349',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.636476,23.568676;113.63533,23.569058;113.633746,23.569614;113.633485,23.569674;113.633247,23.569688'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿政通路途径灌村路向西南行驶2.0千米左转',\n",
       "      'orientation': '西南',\n",
       "      'road': '政通路',\n",
       "      'distance': '1983',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '203',\n",
       "      'polyline': '113.63306,23.569683;113.632773,23.569631;113.632374,23.569488;113.631988,23.569314;113.631853,23.569219;113.631793,23.569154;113.631697,23.568993;113.631441,23.568333;113.63128,23.567943;113.63122,23.56783;113.631085,23.567652;113.630942,23.567522;113.630764,23.567383;113.630451,23.567153;113.630109,23.566879;113.629588,23.566454;113.629058,23.565794;113.628924,23.565673;113.628355,23.565169;113.62826,23.565022;113.62806,23.564588;113.627656,23.563945;113.627565,23.563811;113.627409,23.563646;113.626567,23.562999;113.62625,23.562804;113.625955,23.562678;113.624983,23.562361;113.624427,23.562179;113.62349,23.561905;113.623212,23.561766;113.622995,23.561589;113.622652,23.561181;113.622044,23.560521;113.621936,23.560417;113.621766,23.560312;113.62151,23.560221;113.620603,23.560009;113.620221,23.559922;113.619575,23.559753;113.619423,23.55974;113.61918,23.559727;113.618555,23.559796;113.618355,23.559839;113.618247,23.559887',\n",
       "      'action': '左转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '242',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.63306,23.569683;113.632773,23.569631;113.632374,23.569488;113.631988,23.569314;113.631853,23.569219;113.631793,23.569154;113.631697,23.568993;113.631441,23.568333'},\n",
       "       {'lcode': [],\n",
       "        'distance': '46',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.631441,23.568333;113.63128,23.567943'},\n",
       "       {'lcode': [],\n",
       "        'distance': '82',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.63128,23.567943;113.63122,23.56783;113.631085,23.567652;113.630942,23.567522;113.630764,23.567383'},\n",
       "       {'lcode': [],\n",
       "        'distance': '40',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.630764,23.567383;113.630451,23.567153'},\n",
       "       {'lcode': [],\n",
       "        'distance': '46',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.630451,23.567153;113.630109,23.566879'},\n",
       "       {'lcode': [],\n",
       "        'distance': '746',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.630109,23.566879;113.629588,23.566454;113.629058,23.565794;113.628924,23.565673;113.628355,23.565169;113.62826,23.565022;113.62806,23.564588;113.627656,23.563945;113.627565,23.563811;113.627409,23.563646;113.626567,23.562999;113.62625,23.562804;113.625955,23.562678;113.624983,23.562361'},\n",
       "       {'lcode': [],\n",
       "        'distance': '660',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.624983,23.562361;113.624427,23.562179;113.62349,23.561905;113.623212,23.561766;113.622995,23.561589;113.622652,23.561181;113.622044,23.560521;113.621936,23.560417;113.621766,23.560312;113.62151,23.560221;113.620603,23.560009;113.620221,23.559922;113.619575,23.559753;113.619423,23.55974'},\n",
       "       {'lcode': [],\n",
       "        'distance': '24',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.619423,23.55974;113.61918,23.559727'},\n",
       "       {'lcode': [],\n",
       "        'distance': '97',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.61918,23.559727;113.618555,23.559796;113.618355,23.559839;113.618247,23.559887'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿环市东路向西南行驶1.6千米向右前方行驶',\n",
       "      'orientation': '西南',\n",
       "      'road': '环市东路',\n",
       "      'distance': '1587',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '143',\n",
       "      'polyline': '113.618142,23.55997;113.617943,23.559766;113.61697,23.558819;113.615729,23.5576;113.61536,23.557222;113.6151,23.556975;113.614913,23.556793;113.614718,23.556602;113.614054,23.555933;113.613759,23.555608;113.613372,23.555122;113.613129,23.554688;113.613099,23.554622;113.612826,23.554015;113.612652,23.553555;113.612626,23.553485;113.612609,23.553438;113.612552,23.553286;113.612287,23.552565;113.61207,23.551992;113.611966,23.551771;113.61181,23.551476;113.611554,23.551102;113.611328,23.550846;113.611063,23.55059;113.610438,23.550078;113.609961,23.549688;113.609462,23.549288;113.609206,23.549063;113.609054,23.548924;113.608841,23.548676',\n",
       "      'action': '向右前方行驶',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '29',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.618142,23.55997;113.617943,23.559766'},\n",
       "       {'lcode': [],\n",
       "        'distance': '144',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.617943,23.559766;113.61697,23.558819'},\n",
       "       {'lcode': [],\n",
       "        'distance': '185',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.61697,23.558819;113.615729,23.5576'},\n",
       "       {'lcode': [],\n",
       "        'distance': '55',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.615729,23.5576;113.61536,23.557222'},\n",
       "       {'lcode': [],\n",
       "        'distance': '38',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.61536,23.557222;113.6151,23.556975'},\n",
       "       {'lcode': [],\n",
       "        'distance': '27',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.6151,23.556975;113.614913,23.556793'},\n",
       "       {'lcode': [],\n",
       "        'distance': '29',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.614913,23.556793;113.614718,23.556602'},\n",
       "       {'lcode': [],\n",
       "        'distance': '147',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.614718,23.556602;113.614054,23.555933;113.613759,23.555608'},\n",
       "       {'lcode': [],\n",
       "        'distance': '66',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.613759,23.555608;113.613372,23.555122'},\n",
       "       {'lcode': [],\n",
       "        'distance': '62',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.613372,23.555122;113.613129,23.554688;113.613099,23.554622'},\n",
       "       {'lcode': [],\n",
       "        'distance': '127',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.613099,23.554622;113.612826,23.554015;113.612652,23.553555'},\n",
       "       {'lcode': [],\n",
       "        'distance': '13',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.612652,23.553555;113.612626,23.553485;113.612609,23.553438'},\n",
       "       {'lcode': [],\n",
       "        'distance': '18',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.612609,23.553438;113.612552,23.553286'},\n",
       "       {'lcode': [],\n",
       "        'distance': '83',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.612552,23.553286;113.612287,23.552565'},\n",
       "       {'lcode': [],\n",
       "        'distance': '130',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.612287,23.552565;113.61207,23.551992;113.611966,23.551771;113.61181,23.551476'},\n",
       "       {'lcode': [],\n",
       "        'distance': '210',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.61181,23.551476;113.611554,23.551102;113.611328,23.550846;113.611063,23.55059;113.610438,23.550078'},\n",
       "       {'lcode': [],\n",
       "        'distance': '65',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.610438,23.550078;113.609961,23.549688'},\n",
       "       {'lcode': [],\n",
       "        'distance': '67',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.609961,23.549688;113.609462,23.549288'},\n",
       "       {'lcode': [],\n",
       "        'distance': '36',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.609462,23.549288;113.609206,23.549063'},\n",
       "       {'lcode': [],\n",
       "        'distance': '56',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.609206,23.549063;113.609054,23.548924;113.608841,23.548676'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿河东北路向西行驶1.5千米向左前方行驶',\n",
       "      'orientation': '西',\n",
       "      'road': '河东北路',\n",
       "      'distance': '1484',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '190',\n",
       "      'polyline': '113.608841,23.548676;113.608455,23.548498;113.606888,23.547691;113.606845,23.547669;113.606445,23.547491;113.604735,23.546732;113.604258,23.546549;113.60385,23.546424;113.603303,23.546315;113.602856,23.546276;113.601775,23.546289;113.601445,23.546293;113.601037,23.546324;113.600898,23.546328;113.600543,23.546345;113.600299,23.546354;113.599492,23.546393;113.599071,23.546372;113.598633,23.54635;113.598485,23.546345;113.597431,23.546293;113.597292,23.546285;113.596784,23.546215;113.596259,23.546141;113.595929,23.546085;113.595816,23.546055;113.595694,23.546007;113.595564,23.545872;113.595464,23.545716;113.59543,23.545612;113.595395,23.545326',\n",
       "      'action': '向左前方行驶',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '232',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.608841,23.548676;113.608455,23.548498;113.606888,23.547691;113.606845,23.547669'},\n",
       "       {'lcode': [],\n",
       "        'distance': '45',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.606845,23.547669;113.606445,23.547491'},\n",
       "       {'lcode': [],\n",
       "        'distance': '194',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.606445,23.547491;113.604735,23.546732'},\n",
       "       {'lcode': [],\n",
       "        'distance': '199',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.604735,23.546732;113.604258,23.546549;113.60385,23.546424;113.603303,23.546315;113.602856,23.546276'},\n",
       "       {'lcode': [],\n",
       "        'distance': '110',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.602856,23.546276;113.601775,23.546289'},\n",
       "       {'lcode': [],\n",
       "        'distance': '33',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.601775,23.546289;113.601445,23.546293'},\n",
       "       {'lcode': [],\n",
       "        'distance': '55',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.601445,23.546293;113.601037,23.546324;113.600898,23.546328'},\n",
       "       {'lcode': [],\n",
       "        'distance': '37',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.600898,23.546328;113.600543,23.546345'},\n",
       "       {'lcode': [],\n",
       "        'distance': '24',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.600543,23.546345;113.600299,23.546354'},\n",
       "       {'lcode': [],\n",
       "        'distance': '125',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.600299,23.546354;113.599492,23.546393;113.599071,23.546372'},\n",
       "       {'lcode': [],\n",
       "        'distance': '59',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.599071,23.546372;113.598633,23.54635;113.598485,23.546345'},\n",
       "       {'lcode': [],\n",
       "        'distance': '108',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.598485,23.546345;113.597431,23.546293'},\n",
       "       {'lcode': [],\n",
       "        'distance': '14',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.597431,23.546293;113.597292,23.546285'},\n",
       "       {'lcode': [],\n",
       "        'distance': '52',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.597292,23.546285;113.596784,23.546215'},\n",
       "       {'lcode': [],\n",
       "        'distance': '54',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.596784,23.546215;113.596259,23.546141'},\n",
       "       {'lcode': [],\n",
       "        'distance': '34',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.596259,23.546141;113.595929,23.546085'},\n",
       "       {'lcode': [],\n",
       "        'distance': '65',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.595929,23.546085;113.595816,23.546055;113.595694,23.546007;113.595564,23.545872;113.595464,23.545716'},\n",
       "       {'lcode': [],\n",
       "        'distance': '44',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.595464,23.545716;113.59543,23.545612;113.595395,23.545326'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿河东北路向南行驶45米向右前方行驶进入右转专用道',\n",
       "      'orientation': '南',\n",
       "      'road': '河东北路',\n",
       "      'distance': '45',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '10',\n",
       "      'polyline': '113.595395,23.545326;113.595421,23.545178;113.595508,23.544926',\n",
       "      'action': '向右前方行驶',\n",
       "      'assistant_action': '进入右转专用道',\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '45',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.595395,23.545326;113.595421,23.545178;113.595508,23.544926'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿355省道向西南行驶53米右转',\n",
       "      'orientation': '西南',\n",
       "      'road': '355省道',\n",
       "      'distance': '53',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '15',\n",
       "      'polyline': '113.595508,23.544926;113.595499,23.54477;113.595464,23.544701;113.595417,23.544627;113.595269,23.544536',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '53',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.595508,23.544926;113.595499,23.54477;113.595464,23.544701;113.595417,23.544627;113.595269,23.544536'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '沿355省道途径街口大桥、新城东路向西行驶998米右转',\n",
       "      'orientation': '西',\n",
       "      'road': '355省道',\n",
       "      'distance': '998',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '213',\n",
       "      'polyline': '113.595269,23.544536;113.594957,23.544588;113.594622,23.544674;113.59214,23.545369;113.591888,23.545447;113.590734,23.546155;113.590395,23.546367;113.590035,23.546584;113.58951,23.546905;113.587704,23.548021;113.587465,23.548103;113.586463,23.548121',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '67',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.595269,23.544536;113.594957,23.544588;113.594622,23.544674'},\n",
       "       {'lcode': [],\n",
       "        'distance': '265',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.594622,23.544674;113.59214,23.545369'},\n",
       "       {'lcode': [],\n",
       "        'distance': '27',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.59214,23.545369;113.591888,23.545447'},\n",
       "       {'lcode': [],\n",
       "        'distance': '141',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.591888,23.545447;113.590734,23.546155'},\n",
       "       {'lcode': [],\n",
       "        'distance': '41',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.590734,23.546155;113.590395,23.546367'},\n",
       "       {'lcode': [],\n",
       "        'distance': '43',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.590395,23.546367;113.590035,23.546584'},\n",
       "       {'lcode': [],\n",
       "        'distance': '64',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.590035,23.546584;113.58951,23.546905'},\n",
       "       {'lcode': [],\n",
       "        'distance': '248',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.58951,23.546905;113.587704,23.548021;113.587465,23.548103'},\n",
       "       {'lcode': [],\n",
       "        'distance': '102',\n",
       "        'status': '畅通',\n",
       "        'polyline': '113.587465,23.548103;113.586463,23.548121'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向北行驶90米右转',\n",
       "      'orientation': '北',\n",
       "      'distance': '90',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '37',\n",
       "      'polyline': '113.586463,23.548121;113.586463,23.548286;113.586476,23.548624;113.586493,23.548941',\n",
       "      'action': '右转',\n",
       "      'assistant_action': [],\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '18',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.586463,23.548121;113.586463,23.548286'},\n",
       "       {'lcode': [],\n",
       "        'distance': '37',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.586463,23.548286;113.586476,23.548624'},\n",
       "       {'lcode': [],\n",
       "        'distance': '35',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.586476,23.548624;113.586493,23.548941'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]},\n",
       "     {'instruction': '向东行驶11米到达目的地',\n",
       "      'orientation': '东',\n",
       "      'distance': '11',\n",
       "      'tolls': '0',\n",
       "      'toll_distance': '0',\n",
       "      'toll_road': [],\n",
       "      'duration': '4',\n",
       "      'polyline': '113.586493,23.548941;113.586606,23.548941',\n",
       "      'action': [],\n",
       "      'assistant_action': '到达目的地',\n",
       "      'tmcs': [{'lcode': [],\n",
       "        'distance': '11',\n",
       "        'status': '未知',\n",
       "        'polyline': '113.586493,23.548941;113.586606,23.548941'}],\n",
       "      'cities': [{'name': '广州市',\n",
       "        'citycode': '020',\n",
       "        'adcode': '440100',\n",
       "        'districts': [{'name': '从化区', 'adcode': '440117'}]}]}],\n",
       "    'restriction': '0',\n",
       "    'traffic_lights': '5'}]}}"
      ]
     },
     "execution_count": 263,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 行政区域查询\n",
    "- 行政区域查询是一类简单的HTTP接口，根据用户输入的搜索条件可以帮助用户快速的查找特定的行政区域信息。\n",
    "### 准备工作\n",
    "1. url:https://restapi.amap.com/v3/config/district?parameters\n",
    "2. requests.get\n",
    "3. key, keywords"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 299,
   "metadata": {},
   "outputs": [],
   "source": [
    "def districts(keywords):\n",
    "    inquire_url:\"https://restapi.amap.com/v3/config/district?parameters\"\n",
    "    params = {\n",
    "    \n",
    "        'key':xiaoliu_map,\n",
    "        'keywords':keywords,\n",
    "        'substricts':2\n",
    "}\n",
    "\n",
    "    r = requests.get(\"https://restapi.amap.com/v3/config/district?parameters\",params=params)\n",
    "    results = r.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 300,
   "metadata": {},
   "outputs": [],
   "source": [
    "url_districts = \"https://restapi.amap.com/v3/config/district?parameters\"\n",
    "params_districts = {\n",
    "    \"key\":xiaoliu_map,\n",
    "    \"keywords\":\"深圳\",\n",
    "    'substricts':2\n",
    "}\n",
    "r = requests.get(url_districts,params_districts)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 301,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 301,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 302,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'count': '1',\n",
       " 'suggestion': {'keywords': [], 'cities': []},\n",
       " 'districts': [{'citycode': '0755',\n",
       "   'adcode': '440300',\n",
       "   'name': '深圳市',\n",
       "   'center': '114.085947,22.547',\n",
       "   'level': 'city',\n",
       "   'districts': [{'citycode': '0755',\n",
       "     'adcode': '440306',\n",
       "     'name': '宝安区',\n",
       "     'center': '113.828671,22.754741',\n",
       "     'level': 'district',\n",
       "     'districts': []},\n",
       "    {'citycode': '0755',\n",
       "     'adcode': '440305',\n",
       "     'name': '南山区',\n",
       "     'center': '113.92943,22.531221',\n",
       "     'level': 'district',\n",
       "     'districts': []},\n",
       "    {'citycode': '0755',\n",
       "     'adcode': '440304',\n",
       "     'name': '福田区',\n",
       "     'center': '114.05096,22.541009',\n",
       "     'level': 'district',\n",
       "     'districts': []},\n",
       "    {'citycode': '0755',\n",
       "     'adcode': '440308',\n",
       "     'name': '盐田区',\n",
       "     'center': '114.235366,22.555069',\n",
       "     'level': 'district',\n",
       "     'districts': []},\n",
       "    {'citycode': '0755',\n",
       "     'adcode': '440303',\n",
       "     'name': '罗湖区',\n",
       "     'center': '114.123885,22.555341',\n",
       "     'level': 'district',\n",
       "     'districts': []},\n",
       "    {'citycode': '0755',\n",
       "     'adcode': '440310',\n",
       "     'name': '坪山区',\n",
       "     'center': '114.338441,22.69423',\n",
       "     'level': 'district',\n",
       "     'districts': []},\n",
       "    {'citycode': '0755',\n",
       "     'adcode': '440307',\n",
       "     'name': '龙岗区',\n",
       "     'center': '114.251372,22.721511',\n",
       "     'level': 'district',\n",
       "     'districts': []},\n",
       "    {'citycode': '0755',\n",
       "     'adcode': '440309',\n",
       "     'name': '龙华区',\n",
       "     'center': '114.044346,22.691963',\n",
       "     'level': 'district',\n",
       "     'districts': []},\n",
       "    {'citycode': '0755',\n",
       "     'adcode': '440311',\n",
       "     'name': '光明区',\n",
       "     'center': '113.935895,22.748816',\n",
       "     'level': 'district',\n",
       "     'districts': []}]}]}"
      ]
     },
     "execution_count": 302,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 303,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>citycode</th>\n",
       "      <th>adcode</th>\n",
       "      <th>name</th>\n",
       "      <th>center</th>\n",
       "      <th>level</th>\n",
       "      <th>districts</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0755</td>\n",
       "      <td>440306</td>\n",
       "      <td>宝安区</td>\n",
       "      <td>113.828671,22.754741</td>\n",
       "      <td>district</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>0755</td>\n",
       "      <td>440305</td>\n",
       "      <td>南山区</td>\n",
       "      <td>113.92943,22.531221</td>\n",
       "      <td>district</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>0755</td>\n",
       "      <td>440304</td>\n",
       "      <td>福田区</td>\n",
       "      <td>114.05096,22.541009</td>\n",
       "      <td>district</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>0755</td>\n",
       "      <td>440308</td>\n",
       "      <td>盐田区</td>\n",
       "      <td>114.235366,22.555069</td>\n",
       "      <td>district</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>0755</td>\n",
       "      <td>440303</td>\n",
       "      <td>罗湖区</td>\n",
       "      <td>114.123885,22.555341</td>\n",
       "      <td>district</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>0755</td>\n",
       "      <td>440310</td>\n",
       "      <td>坪山区</td>\n",
       "      <td>114.338441,22.69423</td>\n",
       "      <td>district</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>0755</td>\n",
       "      <td>440307</td>\n",
       "      <td>龙岗区</td>\n",
       "      <td>114.251372,22.721511</td>\n",
       "      <td>district</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>0755</td>\n",
       "      <td>440309</td>\n",
       "      <td>龙华区</td>\n",
       "      <td>114.044346,22.691963</td>\n",
       "      <td>district</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>0755</td>\n",
       "      <td>440311</td>\n",
       "      <td>光明区</td>\n",
       "      <td>113.935895,22.748816</td>\n",
       "      <td>district</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  citycode  adcode name                center     level districts\n",
       "0     0755  440306  宝安区  113.828671,22.754741  district        []\n",
       "1     0755  440305  南山区   113.92943,22.531221  district        []\n",
       "2     0755  440304  福田区   114.05096,22.541009  district        []\n",
       "3     0755  440308  盐田区  114.235366,22.555069  district        []\n",
       "4     0755  440303  罗湖区  114.123885,22.555341  district        []\n",
       "5     0755  440310  坪山区   114.338441,22.69423  district        []\n",
       "6     0755  440307  龙岗区  114.251372,22.721511  district        []\n",
       "7     0755  440309  龙华区  114.044346,22.691963  district        []\n",
       "8     0755  440311  光明区  113.935895,22.748816  district        []"
      ]
     },
     "execution_count": 303,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "pd.json_normalize(r.json()['districts'][0]['districts'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 搜索POI\n",
    "- 提供多种查询POI信息的能力，其中包括关键字搜索、周边搜索、多边形搜索、ID查询四种筛选机制。\n",
    "### 准备工作\n",
    "1. url:https://restapi.amap.com/v3/place/text?parameters\n",
    "2. requests.get\n",
    "3. key, keywords,types"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 273,
   "metadata": {},
   "outputs": [],
   "source": [
    "def POI(keywords):\n",
    "    url:\"https://restapi.amap.com/v3/place/text?parameters\"\n",
    "    params = {\n",
    "    \n",
    "        'key':xiaoliu_map,\n",
    "        'keywords':keywords,\n",
    "        \"types\":types,\n",
    "        \"city\":city\n",
    "}\n",
    "\n",
    "    r = requests.get(\"https://restapi.amap.com/v3/place/text?parameters\",params=params)\n",
    "    results = r.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 274,
   "metadata": {},
   "outputs": [],
   "source": [
    "url_poi = \"https://restapi.amap.com/v3/place/text?parameters\"\n",
    "params_poi = {\n",
    "    \"key\":xiaoliu_map,\n",
    "    \"keywords\":\"深圳大学\",\n",
    "    \"types\":\"高等院校\",\n",
    "    \"city\":\"深圳\"\n",
    "}\n",
    "r = requests.get(url_poi,params_poi)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 275,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 275,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 276,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'suggestion': {'keywords': [], 'cities': []},\n",
       " 'count': '644',\n",
       " 'infocode': '10000',\n",
       " 'pois': [{'parent': [],\n",
       "   'address': '南海大道3688号',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '5.0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/8cf7e6f6486af67754d8af8990d1e12a'},\n",
       "    {'provider': [],\n",
       "     'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/5ccae81406887a358ce0de597cb3df38'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1c5ac33b5ae33e81971b9d38ff1c4545'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学粤海校区',\n",
       "   'location': '113.936683,22.532681',\n",
       "   'tel': '0755-26536114',\n",
       "   'shopid': [],\n",
       "   'id': 'B02F37UIGT'},\n",
       "  {'parent': [],\n",
       "   'address': '留仙大道2056',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '5.0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/1d654a61b12d8f715b29f70e25a1c9d3'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/7536b8566a4c665060cc7c24a957e916'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e0d8499c7e5f75612f88d44126c5d1c0'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学城',\n",
       "   'location': '113.972654,22.59163',\n",
       "   'tel': '0755-26032948;0755-26032921',\n",
       "   'shopid': [],\n",
       "   'id': 'B02F309RHO'},\n",
       "  {'parent': 'B0FFHINQ37',\n",
       "   'address': '桃源街道学苑大道1066号',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '5.0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e6733a974c84e7c23791da41bf0e2783'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/132dd2179a3ec7b0022a9d0157c48f24'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e591cc4cadef97de5b951afd85c95638'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学丽湖校区',\n",
       "   'location': '113.992764,22.596789',\n",
       "   'tel': '0755-26536114',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFFTROX1'},\n",
       "  {'parent': 'B02F37UIGT',\n",
       "   'address': '后海大道与白石路交叉口东南50米',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/eb3670cca4e1276049669e960c218a25'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/90c07322ce5538da7a8221c241d60fe1'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/61b5fa2c47a423dc7aff3f308149dd52'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '0',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学沧海校区',\n",
       "   'location': '113.939382,22.528137',\n",
       "   'tel': '0755-26536190',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFFWE63X'},\n",
       "  {'parent': [],\n",
       "   'address': '竹坳路3',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '4.5'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/079e437d40229fe5e642c86f9f6c03fb'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '坪山区',\n",
       "   'name': '深圳技术大学',\n",
       "   'location': '114.400507,22.703029',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFK4HFDB'},\n",
       "  {'parent': 'B02F37UIGT',\n",
       "   'address': '学生西路深圳大学',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学教学楼',\n",
       "   'location': '113.936894,22.532426',\n",
       "   'tel': '0755-26557391',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLKQ98G'},\n",
       "  {'parent': [],\n",
       "   'address': '深圳大学丽湖校区',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/f5027a65715ab081953c102c3f4c09ec'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': [],\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学医学部',\n",
       "   'location': '113.994280,22.592832',\n",
       "   'tel': '0755-86671923',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFHINQ37'},\n",
       "  {'parent': 'B02F37UIGT',\n",
       "   'address': '深大北路深圳大学',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学-汇星楼',\n",
       "   'location': '113.937007,22.535104',\n",
       "   'tel': '0755-26536114',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLFC4F5'},\n",
       "  {'parent': 'B02F37UIGT',\n",
       "   'address': '南海大道3688号深圳大学',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': '外景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/cceaba493de830773a958c9087f48ab9'},\n",
       "    {'provider': [],\n",
       "     'title': '内景图',\n",
       "     'url': 'http://store.is.autonavi.com/showpic/e2d7a4eec7f6852ee6d5f9cabfb4cff3'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/bc93cb5317bfa2b158a601a181a46a14'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学-师范学院(部)',\n",
       "   'location': '113.933,22.534239',\n",
       "   'tel': '0755-26557079;0755-26534297',\n",
       "   'shopid': [],\n",
       "   'id': 'B02F309RHQ'},\n",
       "  {'parent': 'B02F37UIGT',\n",
       "   'address': '南油大道深圳大学办公楼323',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '3.5'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/56e7864083ee8473fe2bf1427e17d3ae'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/c66c0eb939eb739898640a8586861df0'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/458f3b0d4fefecbd1218aa855ca18300'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学-管理学院',\n",
       "   'location': '113.934853,22.538091',\n",
       "   'tel': '0755-26536121',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFF4JH95'},\n",
       "  {'parent': 'B02F37UIGT',\n",
       "   'address': '深圳大学沧海校区',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '3.0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/2400d7b64e69bb61f89b3d5a7f8acb0d'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/7dee44371ce3e42a190c04e911106688'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/081b6854fc77676be9cb6094d1c4bef4'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学艺术设计学院',\n",
       "   'location': '113.937263,22.530729',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B02F37W4YY'},\n",
       "  {'parent': 'B02F37UIGT',\n",
       "   'address': '南海大道3688号深圳大学',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3f4c52a2d4e6bfd66a642beba60b5c5e'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学-留学生楼',\n",
       "   'location': '113.932649,22.529431',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B02F38OXZK'},\n",
       "  {'parent': 'B02F37UIGT',\n",
       "   'address': '学生西路深圳大学',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学汇紫楼',\n",
       "   'location': '113.936854,22.532265',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLJCAQA'},\n",
       "  {'parent': 'B02F37UIGT',\n",
       "   'address': '南海大道3688号深圳大学内',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学-师范学院B教学楼',\n",
       "   'location': '113.932863,22.533799',\n",
       "   'tel': '0755-26557079',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFFEWDQG'},\n",
       "  {'parent': 'B02F37UIGT',\n",
       "   'address': '南海大道3688号深圳大学综合楼',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学国际交流学院',\n",
       "   'location': '113.934999,22.527906',\n",
       "   'tel': '0755-26558894',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFGY1FCH'},\n",
       "  {'parent': 'B0FFFWE63X',\n",
       "   'address': '白石路深圳大学沧海校区',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': '3.0'},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/3760c00afb9b745ea38e4b32af092432'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/956888d753d917f9ddeb79b15963c7ff'},\n",
       "    {'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/b940c87124641f086b984412145cf001'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学-土木工程学院',\n",
       "   'location': '113.938562,22.526378',\n",
       "   'tel': '0755-26732850;0755-26732826',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFFD3OQC'},\n",
       "  {'parent': 'B0FFFWE63X',\n",
       "   'address': '桂庙村南白石路',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [{'provider': [],\n",
       "     'title': [],\n",
       "     'url': 'http://store.is.autonavi.com/showpic/34a037c05276b6c38299fbee9da6287e'}],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学-机电与控制工程学院',\n",
       "   'location': '113.938013,22.526929',\n",
       "   'tel': '0755-26534869',\n",
       "   'shopid': [],\n",
       "   'id': 'B02F38JLYX'},\n",
       "  {'parent': 'B0FFFWE63X',\n",
       "   'address': '南海大道3688号',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学信息工程学院',\n",
       "   'location': '113.938181,22.528085',\n",
       "   'tel': '0755-26536617',\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFFEVUAH'},\n",
       "  {'parent': 'B02F37UIGT',\n",
       "   'address': '南山大道3688号',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学-汇智楼',\n",
       "   'location': '113.935950,22.531482',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLFDNRC'},\n",
       "  {'parent': 'B0FFFTROX1',\n",
       "   'address': '二线公路',\n",
       "   'distance': [],\n",
       "   'biz_ext': {'cost': [], 'rating': []},\n",
       "   'pname': '广东省',\n",
       "   'importance': [],\n",
       "   'biz_type': [],\n",
       "   'cityname': '深圳市',\n",
       "   'type': '科教文化服务;学校;高等院校',\n",
       "   'photos': [],\n",
       "   'typecode': '141201',\n",
       "   'shopinfo': '0',\n",
       "   'poiweight': [],\n",
       "   'childtype': '309',\n",
       "   'adname': '南山区',\n",
       "   'name': '深圳大学丽湖校区2期(建设中)',\n",
       "   'location': '113.990127,22.602962',\n",
       "   'tel': [],\n",
       "   'shopid': [],\n",
       "   'id': 'B0FFLPTRD7'}],\n",
       " 'status': '1',\n",
       " 'info': 'OK'}"
      ]
     },
     "execution_count": 276,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 277,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>parent</th>\n",
       "      <th>address</th>\n",
       "      <th>distance</th>\n",
       "      <th>pname</th>\n",
       "      <th>importance</th>\n",
       "      <th>biz_type</th>\n",
       "      <th>cityname</th>\n",
       "      <th>type</th>\n",
       "      <th>photos</th>\n",
       "      <th>typecode</th>\n",
       "      <th>...</th>\n",
       "      <th>poiweight</th>\n",
       "      <th>childtype</th>\n",
       "      <th>adname</th>\n",
       "      <th>name</th>\n",
       "      <th>location</th>\n",
       "      <th>tel</th>\n",
       "      <th>shopid</th>\n",
       "      <th>id</th>\n",
       "      <th>biz_ext.cost</th>\n",
       "      <th>biz_ext.rating</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>[]</td>\n",
       "      <td>南海大道3688号</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': [], 'url': 'http://...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学粤海校区</td>\n",
       "      <td>113.936683,22.532681</td>\n",
       "      <td>0755-26536114</td>\n",
       "      <td>[]</td>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>[]</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>[]</td>\n",
       "      <td>留仙大道2056</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': [], 'url': 'http://...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学城</td>\n",
       "      <td>113.972654,22.59163</td>\n",
       "      <td>0755-26032948;0755-26032921</td>\n",
       "      <td>[]</td>\n",
       "      <td>B02F309RHO</td>\n",
       "      <td>[]</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>B0FFHINQ37</td>\n",
       "      <td>桃源街道学苑大道1066号</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': [], 'url': 'http://...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学丽湖校区</td>\n",
       "      <td>113.992764,22.596789</td>\n",
       "      <td>0755-26536114</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFFTROX1</td>\n",
       "      <td>[]</td>\n",
       "      <td>5.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>后海大道与白石路交叉口东南50米</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': [], 'url': 'http://...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>0</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学沧海校区</td>\n",
       "      <td>113.939382,22.528137</td>\n",
       "      <td>0755-26536190</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFFWE63X</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>[]</td>\n",
       "      <td>竹坳路3</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': [], 'url': 'http://...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>坪山区</td>\n",
       "      <td>深圳技术大学</td>\n",
       "      <td>114.400507,22.703029</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFK4HFDB</td>\n",
       "      <td>[]</td>\n",
       "      <td>4.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>学生西路深圳大学</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学教学楼</td>\n",
       "      <td>113.936894,22.532426</td>\n",
       "      <td>0755-26557391</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFLKQ98G</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>[]</td>\n",
       "      <td>深圳大学丽湖校区</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': [], 'url': 'http://...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学医学部</td>\n",
       "      <td>113.994280,22.592832</td>\n",
       "      <td>0755-86671923</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFHINQ37</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>深大北路深圳大学</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学-汇星楼</td>\n",
       "      <td>113.937007,22.535104</td>\n",
       "      <td>0755-26536114</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFLFC4F5</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>南海大道3688号深圳大学</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': '外景图', 'url': 'http...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学-师范学院(部)</td>\n",
       "      <td>113.933,22.534239</td>\n",
       "      <td>0755-26557079;0755-26534297</td>\n",
       "      <td>[]</td>\n",
       "      <td>B02F309RHQ</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>南油大道深圳大学办公楼323</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': [], 'url': 'http://...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学-管理学院</td>\n",
       "      <td>113.934853,22.538091</td>\n",
       "      <td>0755-26536121</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFF4JH95</td>\n",
       "      <td>[]</td>\n",
       "      <td>3.5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>10</th>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>深圳大学沧海校区</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': [], 'url': 'http://...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学艺术设计学院</td>\n",
       "      <td>113.937263,22.530729</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>B02F37W4YY</td>\n",
       "      <td>[]</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>南海大道3688号深圳大学</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': [], 'url': 'http://...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学-留学生楼</td>\n",
       "      <td>113.932649,22.529431</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>B02F38OXZK</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>12</th>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>学生西路深圳大学</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学汇紫楼</td>\n",
       "      <td>113.936854,22.532265</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFLJCAQA</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>13</th>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>南海大道3688号深圳大学内</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学-师范学院B教学楼</td>\n",
       "      <td>113.932863,22.533799</td>\n",
       "      <td>0755-26557079</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFFEWDQG</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>14</th>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>南海大道3688号深圳大学综合楼</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学国际交流学院</td>\n",
       "      <td>113.934999,22.527906</td>\n",
       "      <td>0755-26558894</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFGY1FCH</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>15</th>\n",
       "      <td>B0FFFWE63X</td>\n",
       "      <td>白石路深圳大学沧海校区</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': [], 'url': 'http://...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学-土木工程学院</td>\n",
       "      <td>113.938562,22.526378</td>\n",
       "      <td>0755-26732850;0755-26732826</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFFD3OQC</td>\n",
       "      <td>[]</td>\n",
       "      <td>3.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>16</th>\n",
       "      <td>B0FFFWE63X</td>\n",
       "      <td>桂庙村南白石路</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[{'provider': [], 'title': [], 'url': 'http://...</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学-机电与控制工程学院</td>\n",
       "      <td>113.938013,22.526929</td>\n",
       "      <td>0755-26534869</td>\n",
       "      <td>[]</td>\n",
       "      <td>B02F38JLYX</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>17</th>\n",
       "      <td>B0FFFWE63X</td>\n",
       "      <td>南海大道3688号</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学信息工程学院</td>\n",
       "      <td>113.938181,22.528085</td>\n",
       "      <td>0755-26536617</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFFEVUAH</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>18</th>\n",
       "      <td>B02F37UIGT</td>\n",
       "      <td>南山大道3688号</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学-汇智楼</td>\n",
       "      <td>113.935950,22.531482</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFLFDNRC</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>19</th>\n",
       "      <td>B0FFFTROX1</td>\n",
       "      <td>二线公路</td>\n",
       "      <td>[]</td>\n",
       "      <td>广东省</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>深圳市</td>\n",
       "      <td>科教文化服务;学校;高等院校</td>\n",
       "      <td>[]</td>\n",
       "      <td>141201</td>\n",
       "      <td>...</td>\n",
       "      <td>[]</td>\n",
       "      <td>309</td>\n",
       "      <td>南山区</td>\n",
       "      <td>深圳大学丽湖校区2期(建设中)</td>\n",
       "      <td>113.990127,22.602962</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>B0FFLPTRD7</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>20 rows × 21 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "        parent           address distance pname importance biz_type cityname  \\\n",
       "0           []         南海大道3688号       []   广东省         []       []      深圳市   \n",
       "1           []          留仙大道2056       []   广东省         []       []      深圳市   \n",
       "2   B0FFHINQ37     桃源街道学苑大道1066号       []   广东省         []       []      深圳市   \n",
       "3   B02F37UIGT  后海大道与白石路交叉口东南50米       []   广东省         []       []      深圳市   \n",
       "4           []              竹坳路3       []   广东省         []       []      深圳市   \n",
       "5   B02F37UIGT          学生西路深圳大学       []   广东省         []       []      深圳市   \n",
       "6           []          深圳大学丽湖校区       []   广东省         []       []      深圳市   \n",
       "7   B02F37UIGT          深大北路深圳大学       []   广东省         []       []      深圳市   \n",
       "8   B02F37UIGT     南海大道3688号深圳大学       []   广东省         []       []      深圳市   \n",
       "9   B02F37UIGT    南油大道深圳大学办公楼323       []   广东省         []       []      深圳市   \n",
       "10  B02F37UIGT          深圳大学沧海校区       []   广东省         []       []      深圳市   \n",
       "11  B02F37UIGT     南海大道3688号深圳大学       []   广东省         []       []      深圳市   \n",
       "12  B02F37UIGT          学生西路深圳大学       []   广东省         []       []      深圳市   \n",
       "13  B02F37UIGT    南海大道3688号深圳大学内       []   广东省         []       []      深圳市   \n",
       "14  B02F37UIGT  南海大道3688号深圳大学综合楼       []   广东省         []       []      深圳市   \n",
       "15  B0FFFWE63X       白石路深圳大学沧海校区       []   广东省         []       []      深圳市   \n",
       "16  B0FFFWE63X           桂庙村南白石路       []   广东省         []       []      深圳市   \n",
       "17  B0FFFWE63X         南海大道3688号       []   广东省         []       []      深圳市   \n",
       "18  B02F37UIGT         南山大道3688号       []   广东省         []       []      深圳市   \n",
       "19  B0FFFTROX1              二线公路       []   广东省         []       []      深圳市   \n",
       "\n",
       "              type                                             photos  \\\n",
       "0   科教文化服务;学校;高等院校  [{'provider': [], 'title': [], 'url': 'http://...   \n",
       "1   科教文化服务;学校;高等院校  [{'provider': [], 'title': [], 'url': 'http://...   \n",
       "2   科教文化服务;学校;高等院校  [{'provider': [], 'title': [], 'url': 'http://...   \n",
       "3   科教文化服务;学校;高等院校  [{'provider': [], 'title': [], 'url': 'http://...   \n",
       "4   科教文化服务;学校;高等院校  [{'provider': [], 'title': [], 'url': 'http://...   \n",
       "5   科教文化服务;学校;高等院校                                                 []   \n",
       "6   科教文化服务;学校;高等院校  [{'provider': [], 'title': [], 'url': 'http://...   \n",
       "7   科教文化服务;学校;高等院校                                                 []   \n",
       "8   科教文化服务;学校;高等院校  [{'provider': [], 'title': '外景图', 'url': 'http...   \n",
       "9   科教文化服务;学校;高等院校  [{'provider': [], 'title': [], 'url': 'http://...   \n",
       "10  科教文化服务;学校;高等院校  [{'provider': [], 'title': [], 'url': 'http://...   \n",
       "11  科教文化服务;学校;高等院校  [{'provider': [], 'title': [], 'url': 'http://...   \n",
       "12  科教文化服务;学校;高等院校                                                 []   \n",
       "13  科教文化服务;学校;高等院校                                                 []   \n",
       "14  科教文化服务;学校;高等院校                                                 []   \n",
       "15  科教文化服务;学校;高等院校  [{'provider': [], 'title': [], 'url': 'http://...   \n",
       "16  科教文化服务;学校;高等院校  [{'provider': [], 'title': [], 'url': 'http://...   \n",
       "17  科教文化服务;学校;高等院校                                                 []   \n",
       "18  科教文化服务;学校;高等院校                                                 []   \n",
       "19  科教文化服务;学校;高等院校                                                 []   \n",
       "\n",
       "   typecode  ... poiweight childtype adname             name  \\\n",
       "0    141201  ...        []        []    南山区         深圳大学粤海校区   \n",
       "1    141201  ...        []        []    南山区            深圳大学城   \n",
       "2    141201  ...        []       309    南山区         深圳大学丽湖校区   \n",
       "3    141201  ...        []         0    南山区         深圳大学沧海校区   \n",
       "4    141201  ...        []        []    坪山区           深圳技术大学   \n",
       "5    141201  ...        []       309    南山区          深圳大学教学楼   \n",
       "6    141201  ...        []        []    南山区          深圳大学医学部   \n",
       "7    141201  ...        []       309    南山区         深圳大学-汇星楼   \n",
       "8    141201  ...        []       309    南山区     深圳大学-师范学院(部)   \n",
       "9    141201  ...        []       309    南山区        深圳大学-管理学院   \n",
       "10   141201  ...        []       309    南山区       深圳大学艺术设计学院   \n",
       "11   141201  ...        []       309    南山区        深圳大学-留学生楼   \n",
       "12   141201  ...        []       309    南山区          深圳大学汇紫楼   \n",
       "13   141201  ...        []       309    南山区    深圳大学-师范学院B教学楼   \n",
       "14   141201  ...        []       309    南山区       深圳大学国际交流学院   \n",
       "15   141201  ...        []       309    南山区      深圳大学-土木工程学院   \n",
       "16   141201  ...        []       309    南山区   深圳大学-机电与控制工程学院   \n",
       "17   141201  ...        []       309    南山区       深圳大学信息工程学院   \n",
       "18   141201  ...        []       309    南山区         深圳大学-汇智楼   \n",
       "19   141201  ...        []       309    南山区  深圳大学丽湖校区2期(建设中)   \n",
       "\n",
       "                location                          tel shopid          id  \\\n",
       "0   113.936683,22.532681                0755-26536114     []  B02F37UIGT   \n",
       "1    113.972654,22.59163  0755-26032948;0755-26032921     []  B02F309RHO   \n",
       "2   113.992764,22.596789                0755-26536114     []  B0FFFTROX1   \n",
       "3   113.939382,22.528137                0755-26536190     []  B0FFFWE63X   \n",
       "4   114.400507,22.703029                           []     []  B0FFK4HFDB   \n",
       "5   113.936894,22.532426                0755-26557391     []  B0FFLKQ98G   \n",
       "6   113.994280,22.592832                0755-86671923     []  B0FFHINQ37   \n",
       "7   113.937007,22.535104                0755-26536114     []  B0FFLFC4F5   \n",
       "8      113.933,22.534239  0755-26557079;0755-26534297     []  B02F309RHQ   \n",
       "9   113.934853,22.538091                0755-26536121     []  B0FFF4JH95   \n",
       "10  113.937263,22.530729                           []     []  B02F37W4YY   \n",
       "11  113.932649,22.529431                           []     []  B02F38OXZK   \n",
       "12  113.936854,22.532265                           []     []  B0FFLJCAQA   \n",
       "13  113.932863,22.533799                0755-26557079     []  B0FFFEWDQG   \n",
       "14  113.934999,22.527906                0755-26558894     []  B0FFGY1FCH   \n",
       "15  113.938562,22.526378  0755-26732850;0755-26732826     []  B0FFFD3OQC   \n",
       "16  113.938013,22.526929                0755-26534869     []  B02F38JLYX   \n",
       "17  113.938181,22.528085                0755-26536617     []  B0FFFEVUAH   \n",
       "18  113.935950,22.531482                           []     []  B0FFLFDNRC   \n",
       "19  113.990127,22.602962                           []     []  B0FFLPTRD7   \n",
       "\n",
       "   biz_ext.cost biz_ext.rating  \n",
       "0            []            5.0  \n",
       "1            []            5.0  \n",
       "2            []            5.0  \n",
       "3            []             []  \n",
       "4            []            4.5  \n",
       "5            []             []  \n",
       "6            []             []  \n",
       "7            []             []  \n",
       "8            []             []  \n",
       "9            []            3.5  \n",
       "10           []            3.0  \n",
       "11           []             []  \n",
       "12           []             []  \n",
       "13           []             []  \n",
       "14           []             []  \n",
       "15           []            3.0  \n",
       "16           []             []  \n",
       "17           []             []  \n",
       "18           []             []  \n",
       "19           []             []  \n",
       "\n",
       "[20 rows x 21 columns]"
      ]
     },
     "execution_count": 277,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "pd.json_normalize(r.json()['pois'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## IP定位\n",
    "- 根据用户输入的IP地址，能够快速的帮用户定位IP的所在位置。\n",
    "### 准备工作\n",
    "1. url:https://restapi.amap.com/v3/ip?parameters\n",
    "2. requests.get\n",
    "3. key, ip"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 292,
   "metadata": {},
   "outputs": [],
   "source": [
    "def ip(ip):\n",
    "    url:\"https://restapi.amap.com/v3/ip?parameters\"\n",
    "    params = {\n",
    "    \n",
    "        'key':xiaoliu_map,\n",
    "        'ip':ip\n",
    "}\n",
    "\n",
    "    r = requests.get(\"https://restapi.amap.com/v3/ip?parameters\",params=params)\n",
    "    results = r.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 293,
   "metadata": {},
   "outputs": [],
   "source": [
    "url_ip = \"https://restapi.amap.com/v3/ip?parameters\"\n",
    "params_ip = {\n",
    "    \"key\":xiaoliu_map,\n",
    "    \"ip\":\"61.242.54.237\" # 我的ip\n",
    "}\n",
    "r = requests.get(url_ip,params_ip)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 107,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 107,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 108,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'province': '广东省',\n",
       " 'city': '广州市',\n",
       " 'adcode': '440100',\n",
       " 'rectangle': '113.1017375,22.93212254;113.6770499,23.3809537'}"
      ]
     },
     "execution_count": 108,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 静态地图  \n",
    "- 静态地图服务通过返回一张地图图片响应HTTP请求，使用户能够将高德地图以图片形式嵌入自己的网页中。用户可以指定请求的地图位置、图片大小、以及在地图上添加覆盖物，如标签、标注、折线、多边形。\n",
    "### 准备工作\n",
    "1. url:https://restapi.amap.com/v3/staticmap?parameters\n",
    "2. requests.get\n",
    "3. key, location, zoom"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 233,
   "metadata": {},
   "outputs": [],
   "source": [
    "def static(location,zoom):\n",
    "    url:\"https://restapi.amap.com/v3/staticmap?parameters\"\n",
    "    params = {\n",
    "    \n",
    "        'key':xiaoliu_map,\n",
    "        'location':location,\n",
    "        'zoom':zoom\n",
    "}\n",
    "\n",
    "    r = requests.get(\"https://restapi.amap.com/v3/staticmap?parameters\",params=params)\n",
    "    results = r.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 234,
   "metadata": {},
   "outputs": [],
   "source": [
    "url_static = \"https://restapi.amap.com/v3/staticmap?parameters\"\n",
    "params_static = {\n",
    "    \"key\":xiaoliu_map,\n",
    "    'location':\"122.684531,30.196974\", # 东极岛\n",
    "    'zoom':10\n",
    "}\n",
    "r = requests.get(url_static,params_static)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 123,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 123,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'https://restapi.amap.com/v3/staticmap?parameters&key=d8383619b68b944efbd5dfdab977b2ae&location=122.684531%2C30.196974&zoom=10'"
      ]
     },
     "execution_count": 124,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.url"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 坐标转换\n",
    "\n",
    "### 准备工作\n",
    "- 能够将用户输入的非高德坐标（GPS坐标、mapbar坐标、baidu坐标）转换成高德坐标。\n",
    "\n",
    "1. url:https://restapi.amap.com/v3/assistant/coordinate/convert?parameters\n",
    "2. requests.get\n",
    "3. key, locations"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 278,
   "metadata": {},
   "outputs": [],
   "source": [
    "def transformation(locations):\n",
    "    url:\"https://restapi.amap.com/v3/assistant/coordinate/convert?parameters\"\n",
    "    params = {\n",
    "        'key':xiaoliu_map,\n",
    "        'locations':locations,\n",
    "    }\n",
    "\n",
    "    r = requests.get(\"https://restapi.amap.com/v3/assistant/coordinate/convert?parameters\",params=params)\n",
    "    results = r.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 279,
   "metadata": {},
   "outputs": [],
   "source": [
    "url_transformation = \"https://restapi.amap.com/v3/assistant/coordinate/convert?parameters\"\n",
    "params_transformation = {\n",
    "    \"key\":xiaoliu_map,\n",
    "    'locations':\"121.21238,31.05258\", # baidu上海视觉艺术学院\n",
    "}\n",
    "r = requests.get(url_transformation,params_transformation)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 280,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 280,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 281,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'info': 'ok',\n",
       " 'infocode': '10000',\n",
       " 'locations': '121.21238,31.05258'}"
      ]
     },
     "execution_count": 281,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 天气查询\n",
    "\n",
    "### 准备工作\n",
    "- 根据用户输入的adcode，查询目标区域当前/未来的天气情况。\n",
    "\n",
    "1. url:https://restapi.amap.com/v3/weather/weatherInfo?parameters\n",
    "2. requests.get\n",
    "3. key, city"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 282,
   "metadata": {},
   "outputs": [],
   "source": [
    "def weather(city):\n",
    "    url:\"https://restapi.amap.com/v3/weather/weatherInfo?parameters\"\n",
    "    params = {\n",
    "    \n",
    "        'key':xiaoliu_map,\n",
    "        'city':city\n",
    "}\n",
    "\n",
    "    r = requests.get(\"https://restapi.amap.com/v3/weather/weatherInfo?parameters\",params=params)\n",
    "    results = r.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 283,
   "metadata": {},
   "outputs": [],
   "source": [
    "url_weather = \"https://restapi.amap.com/v3/weather/weatherInfo?parameters\"\n",
    "params_weather = {\n",
    "    \"key\":xiaoliu_map,\n",
    "    'city':'南京'\n",
    "}\n",
    "r = requests.get(url_weather,params_weather)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 284,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 284,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 285,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '1',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'lives': [{'province': '江苏',\n",
       "   'city': '南京市',\n",
       "   'adcode': '320100',\n",
       "   'weather': '晴',\n",
       "   'temperature': '14',\n",
       "   'winddirection': '东',\n",
       "   'windpower': '≤3',\n",
       "   'humidity': '66',\n",
       "   'reporttime': '2020-11-12 20:27:46'}]}"
      ]
     },
     "execution_count": 285,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 286,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>province</th>\n",
       "      <th>city</th>\n",
       "      <th>adcode</th>\n",
       "      <th>weather</th>\n",
       "      <th>temperature</th>\n",
       "      <th>winddirection</th>\n",
       "      <th>windpower</th>\n",
       "      <th>humidity</th>\n",
       "      <th>reporttime</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>江苏</td>\n",
       "      <td>南京市</td>\n",
       "      <td>320100</td>\n",
       "      <td>晴</td>\n",
       "      <td>14</td>\n",
       "      <td>东</td>\n",
       "      <td>≤3</td>\n",
       "      <td>66</td>\n",
       "      <td>2020-11-12 20:27:46</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "  province city  adcode weather temperature winddirection windpower humidity  \\\n",
       "0       江苏  南京市  320100       晴          14             东        ≤3       66   \n",
       "\n",
       "            reporttime  \n",
       "0  2020-11-12 20:27:46  "
      ]
     },
     "execution_count": 286,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "pd.json_normalize(r.json()['lives'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 输入提示\n",
    "\n",
    "### 准备工作\n",
    "- 提供根据用户输入的关键词查询返回建议列表。\n",
    "\n",
    "1. url:https://restapi.amap.com/v3/assistant/inputtips?parameters\n",
    "2. requests.get\n",
    "3. key, keywords, city"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 287,
   "metadata": {},
   "outputs": [],
   "source": [
    "def tips(keywords,city):\n",
    "    url:\"https://restapi.amap.com/v3/assistant/inputtips?parameters\"\n",
    "    params = {\n",
    "    \n",
    "        'key':xiaoliu_map,\n",
    "        'keywords':keywords,\n",
    "        'city':city\n",
    "}\n",
    "\n",
    "    r = requests.get(\"https://restapi.amap.com/v3/assistant/inputtips?parameters\",params=params)\n",
    "    results = r.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 288,
   "metadata": {},
   "outputs": [],
   "source": [
    "url_tips = \"https://restapi.amap.com/v3/assistant/inputtips?parameters\"\n",
    "params_tips = {\n",
    "    \"key\":xiaoliu_map,\n",
    "    'keywords':\"肯德基\",\n",
    "    'city':\"海口\"\n",
    "}\n",
    "r = requests.get(url_tips,params_tips)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 289,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 289,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 290,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'status': '1',\n",
       " 'count': '10',\n",
       " 'info': 'OK',\n",
       " 'infocode': '10000',\n",
       " 'tips': [{'id': [],\n",
       "   'name': '肯德基',\n",
       "   'district': [],\n",
       "   'adcode': [],\n",
       "   'location': [],\n",
       "   'address': [],\n",
       "   'typecode': [],\n",
       "   'city': []},\n",
       "  {'id': 'B0G22RU5WE',\n",
       "   'name': '肯德基(白龙餐厅)',\n",
       "   'district': '海南省海口市美兰区',\n",
       "   'adcode': '460108',\n",
       "   'location': '110.362394,20.036600',\n",
       "   'address': '文明东路213号一层',\n",
       "   'typecode': '050300',\n",
       "   'city': []},\n",
       "  {'id': 'B0G1HZJ91F',\n",
       "   'name': '肯德基(海口居然之家店)',\n",
       "   'district': '海南省海口市秀英区',\n",
       "   'adcode': '460105',\n",
       "   'location': '110.283526,20.019790',\n",
       "   'address': '滨海大道路102号海口居然之家一层商铺',\n",
       "   'typecode': '050300',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFLMBLKD',\n",
       "   'name': '肯德基(秀英店)',\n",
       "   'district': '海南省海口市秀英区',\n",
       "   'adcode': '460105',\n",
       "   'location': '110.280461,20.003810',\n",
       "   'address': '秀英大道26号鹏泰兴购物广场一二层',\n",
       "   'typecode': '050301',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFKXVEIJ',\n",
       "   'name': '肯德基(群上店)',\n",
       "   'district': '海南省海口市美兰区',\n",
       "   'adcode': '460108',\n",
       "   'location': '110.369155,20.022064',\n",
       "   'address': '白龙街道办事处群上村南侧群上广场一层1F023号商铺、1F024号商铺',\n",
       "   'typecode': '050300',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFKVA780',\n",
       "   'name': '肯德基(中山店)',\n",
       "   'district': '海南省海口市琼山区',\n",
       "   'adcode': '460107',\n",
       "   'location': '110.355510,20.003189',\n",
       "   'address': '中山北路20号乐周生活馆一层及负一层',\n",
       "   'typecode': '050300',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFKGGPMY',\n",
       "   'name': '肯德基(海口远大店)',\n",
       "   'district': '海南省海口市秀英区',\n",
       "   'adcode': '460105',\n",
       "   'location': '110.190921,20.047342',\n",
       "   'address': '长滨四路7号远大购物中心一层B1-22商铺',\n",
       "   'typecode': '050300',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFI8ZPL7',\n",
       "   'name': '肯德基甜品站(上邦百汇城店)',\n",
       "   'district': '海南省海口市龙华区',\n",
       "   'adcode': '460106',\n",
       "   'location': '110.322482,20.021418',\n",
       "   'address': '国贸金龙路上邦百汇城二号楼',\n",
       "   'typecode': '050300',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFI8ZPKG',\n",
       "   'name': '肯德基甜品站(府城店)',\n",
       "   'district': '海南省海口市琼山区',\n",
       "   'adcode': '460107',\n",
       "   'location': '110.355499,20.000420',\n",
       "   'address': '忠介路1号',\n",
       "   'typecode': '050700',\n",
       "   'city': []},\n",
       "  {'id': 'B0FFI8ZFRM',\n",
       "   'name': '肯德基甜品站(龙昆南大润发店)',\n",
       "   'district': '海南省海口市龙华区',\n",
       "   'adcode': '460106',\n",
       "   'location': '110.339032,20.005268',\n",
       "   'address': '龙昆南路58号大润发一楼',\n",
       "   'typecode': '050300',\n",
       "   'city': []}]}"
      ]
     },
     "execution_count": 290,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 291,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>id</th>\n",
       "      <th>name</th>\n",
       "      <th>district</th>\n",
       "      <th>adcode</th>\n",
       "      <th>location</th>\n",
       "      <th>address</th>\n",
       "      <th>typecode</th>\n",
       "      <th>city</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>[]</td>\n",
       "      <td>肯德基</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>B0G22RU5WE</td>\n",
       "      <td>肯德基(白龙餐厅)</td>\n",
       "      <td>海南省海口市美兰区</td>\n",
       "      <td>460108</td>\n",
       "      <td>110.362394,20.036600</td>\n",
       "      <td>文明东路213号一层</td>\n",
       "      <td>050300</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>B0G1HZJ91F</td>\n",
       "      <td>肯德基(海口居然之家店)</td>\n",
       "      <td>海南省海口市秀英区</td>\n",
       "      <td>460105</td>\n",
       "      <td>110.283526,20.019790</td>\n",
       "      <td>滨海大道路102号海口居然之家一层商铺</td>\n",
       "      <td>050300</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>B0FFLMBLKD</td>\n",
       "      <td>肯德基(秀英店)</td>\n",
       "      <td>海南省海口市秀英区</td>\n",
       "      <td>460105</td>\n",
       "      <td>110.280461,20.003810</td>\n",
       "      <td>秀英大道26号鹏泰兴购物广场一二层</td>\n",
       "      <td>050301</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>B0FFKXVEIJ</td>\n",
       "      <td>肯德基(群上店)</td>\n",
       "      <td>海南省海口市美兰区</td>\n",
       "      <td>460108</td>\n",
       "      <td>110.369155,20.022064</td>\n",
       "      <td>白龙街道办事处群上村南侧群上广场一层1F023号商铺、1F024号商铺</td>\n",
       "      <td>050300</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>5</th>\n",
       "      <td>B0FFKVA780</td>\n",
       "      <td>肯德基(中山店)</td>\n",
       "      <td>海南省海口市琼山区</td>\n",
       "      <td>460107</td>\n",
       "      <td>110.355510,20.003189</td>\n",
       "      <td>中山北路20号乐周生活馆一层及负一层</td>\n",
       "      <td>050300</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6</th>\n",
       "      <td>B0FFKGGPMY</td>\n",
       "      <td>肯德基(海口远大店)</td>\n",
       "      <td>海南省海口市秀英区</td>\n",
       "      <td>460105</td>\n",
       "      <td>110.190921,20.047342</td>\n",
       "      <td>长滨四路7号远大购物中心一层B1-22商铺</td>\n",
       "      <td>050300</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>7</th>\n",
       "      <td>B0FFI8ZPL7</td>\n",
       "      <td>肯德基甜品站(上邦百汇城店)</td>\n",
       "      <td>海南省海口市龙华区</td>\n",
       "      <td>460106</td>\n",
       "      <td>110.322482,20.021418</td>\n",
       "      <td>国贸金龙路上邦百汇城二号楼</td>\n",
       "      <td>050300</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>8</th>\n",
       "      <td>B0FFI8ZPKG</td>\n",
       "      <td>肯德基甜品站(府城店)</td>\n",
       "      <td>海南省海口市琼山区</td>\n",
       "      <td>460107</td>\n",
       "      <td>110.355499,20.000420</td>\n",
       "      <td>忠介路1号</td>\n",
       "      <td>050700</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9</th>\n",
       "      <td>B0FFI8ZFRM</td>\n",
       "      <td>肯德基甜品站(龙昆南大润发店)</td>\n",
       "      <td>海南省海口市龙华区</td>\n",
       "      <td>460106</td>\n",
       "      <td>110.339032,20.005268</td>\n",
       "      <td>龙昆南路58号大润发一楼</td>\n",
       "      <td>050300</td>\n",
       "      <td>[]</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "           id             name   district  adcode              location  \\\n",
       "0          []              肯德基         []      []                    []   \n",
       "1  B0G22RU5WE        肯德基(白龙餐厅)  海南省海口市美兰区  460108  110.362394,20.036600   \n",
       "2  B0G1HZJ91F     肯德基(海口居然之家店)  海南省海口市秀英区  460105  110.283526,20.019790   \n",
       "3  B0FFLMBLKD         肯德基(秀英店)  海南省海口市秀英区  460105  110.280461,20.003810   \n",
       "4  B0FFKXVEIJ         肯德基(群上店)  海南省海口市美兰区  460108  110.369155,20.022064   \n",
       "5  B0FFKVA780         肯德基(中山店)  海南省海口市琼山区  460107  110.355510,20.003189   \n",
       "6  B0FFKGGPMY       肯德基(海口远大店)  海南省海口市秀英区  460105  110.190921,20.047342   \n",
       "7  B0FFI8ZPL7   肯德基甜品站(上邦百汇城店)  海南省海口市龙华区  460106  110.322482,20.021418   \n",
       "8  B0FFI8ZPKG      肯德基甜品站(府城店)  海南省海口市琼山区  460107  110.355499,20.000420   \n",
       "9  B0FFI8ZFRM  肯德基甜品站(龙昆南大润发店)  海南省海口市龙华区  460106  110.339032,20.005268   \n",
       "\n",
       "                               address typecode city  \n",
       "0                                   []       []   []  \n",
       "1                           文明东路213号一层   050300   []  \n",
       "2                  滨海大道路102号海口居然之家一层商铺   050300   []  \n",
       "3                    秀英大道26号鹏泰兴购物广场一二层   050301   []  \n",
       "4  白龙街道办事处群上村南侧群上广场一层1F023号商铺、1F024号商铺   050300   []  \n",
       "5                   中山北路20号乐周生活馆一层及负一层   050300   []  \n",
       "6                长滨四路7号远大购物中心一层B1-22商铺   050300   []  \n",
       "7                        国贸金龙路上邦百汇城二号楼   050300   []  \n",
       "8                                忠介路1号   050700   []  \n",
       "9                         龙昆南路58号大润发一楼   050300   []  "
      ]
     },
     "execution_count": 291,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import pandas as pd\n",
    "pd.json_normalize(r.json()['tips'])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## 交通态势\n",
    "\n",
    "### 准备工作\n",
    "- 提供根据用户输入的内容能够返回希望查询的交通态势情况。\n",
    "\n",
    "1. url:https://restapi.amap.com/v3/traffic/status/rectangle?parameters\n",
    "2. requests.get\n",
    "3. key, level, rectangle"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 308,
   "metadata": {},
   "outputs": [],
   "source": [
    "def traffic(level,rectangle):\n",
    "    url:\"https://restapi.amap.com/v3/traffic/status/rectangle?parameters\"\n",
    "    params = {\n",
    "    \n",
    "        'key':xiaoliu_map,\n",
    "        'level':level,\n",
    "        'rectangle':rectangle\n",
    "}\n",
    "\n",
    "    r = requests.get(\"https://restapi.amap.com/v3/traffic/status/rectangle?parameters\",params=params)\n",
    "    results = r.json()\n",
    "    return results"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 309,
   "metadata": {},
   "outputs": [],
   "source": [
    "url_traffic = \"https://restapi.amap.com/v3/traffic/status/rectangle?parameters\"\n",
    "params_traffic = {\n",
    "    \"key\":xiaoliu_map,\n",
    "    'level':4,\n",
    "    'rectangle':\"116.351147,39.966309;116.357134,39.968727\"\n",
    "}\n",
    "r = requests.get(url_traffic,params_traffic)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 310,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<Response [200]>"
      ]
     },
     "execution_count": 310,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 311,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'info': 'INSUFFICIENT_PRIVILEGES',\n",
       " 'infocode': '10012',\n",
       " 'status': '0',\n",
       " 'sec_code_debug': 'd41d8cd98f00b204e9800998ecf8427e',\n",
       " 'key': 'd8383619b68b944efbd5dfdab977b2ae',\n",
       " 'sec_code': 'd41d8cd98f00b204e9800998ecf8427e'}"
      ]
     },
     "execution_count": 311,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r.json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.3"
  },
  "toc": {
   "base_numbering": 1,
   "nav_menu": {},
   "number_sections": true,
   "sideBar": true,
   "skip_h1_title": false,
   "title_cell": "Table of Contents",
   "title_sidebar": "Contents",
   "toc_cell": false,
   "toc_position": {},
   "toc_section_display": true,
   "toc_window_display": false
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
